]> git.lizzy.rs Git - rust.git/blob - tests/ui/trivial-bounds/trivial-bounds-inconsistent.stderr
Rollup merge of #107757 - clubby789:setup-settings-json, r=jyn514
[rust.git] / tests / ui / trivial-bounds / trivial-bounds-inconsistent.stderr
1 warning: trait bound i32: Foo does not depend on any type or lifetime parameters
2   --> $DIR/trivial-bounds-inconsistent.rs:14:19
3    |
4 LL | enum E where i32: Foo { V }
5    |                   ^^^
6    |
7    = note: `#[warn(trivial_bounds)]` on by default
8
9 warning: trait bound i32: Foo does not depend on any type or lifetime parameters
10   --> $DIR/trivial-bounds-inconsistent.rs:16:21
11    |
12 LL | struct S where i32: Foo;
13    |                     ^^^
14
15 warning: trait bound i32: Foo does not depend on any type or lifetime parameters
16   --> $DIR/trivial-bounds-inconsistent.rs:18:20
17    |
18 LL | trait T where i32: Foo {}
19    |                    ^^^
20
21 warning: trait bound i32: Foo does not depend on any type or lifetime parameters
22   --> $DIR/trivial-bounds-inconsistent.rs:20:20
23    |
24 LL | union U where i32: Foo { f: i32 }
25    |                    ^^^
26
27 warning: where clauses are not enforced in type aliases
28   --> $DIR/trivial-bounds-inconsistent.rs:22:14
29    |
30 LL | type Y where i32: Foo = ();
31    |              ^^^^^^^^
32    |
33    = note: `#[warn(type_alias_bounds)]` on by default
34 help: the clause will not be checked when the type alias is used, and should be removed
35    |
36 LL - type Y where i32: Foo = ();
37 LL + type Y  = ();
38    |
39
40 warning: trait bound i32: Foo does not depend on any type or lifetime parameters
41   --> $DIR/trivial-bounds-inconsistent.rs:22:19
42    |
43 LL | type Y where i32: Foo = ();
44    |                   ^^^
45
46 warning: trait bound i32: Foo does not depend on any type or lifetime parameters
47   --> $DIR/trivial-bounds-inconsistent.rs:26:28
48    |
49 LL | impl Foo for () where i32: Foo {
50    |                            ^^^
51
52 warning: trait bound i32: Foo does not depend on any type or lifetime parameters
53   --> $DIR/trivial-bounds-inconsistent.rs:34:19
54    |
55 LL | fn f() where i32: Foo {
56    |                   ^^^
57
58 warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters
59   --> $DIR/trivial-bounds-inconsistent.rs:41:28
60    |
61 LL | fn g() where &'static str: Foo {
62    |                            ^^^
63
64 warning: trait bound str: Sized does not depend on any type or lifetime parameters
65   --> $DIR/trivial-bounds-inconsistent.rs:55:37
66    |
67 LL | struct TwoStrs(str, str) where str: Sized;
68    |                                     ^^^^^
69
70 warning: trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters
71   --> $DIR/trivial-bounds-inconsistent.rs:57:51
72    |
73 LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized {
74    |                                                   ^^^^^
75
76 warning: trait bound str: Sized does not depend on any type or lifetime parameters
77   --> $DIR/trivial-bounds-inconsistent.rs:61:35
78    |
79 LL | fn return_str() -> str where str: Sized {
80    |                                   ^^^^^
81
82 warning: trait bound String: Neg does not depend on any type or lifetime parameters
83   --> $DIR/trivial-bounds-inconsistent.rs:65:46
84    |
85 LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
86    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
88 warning: trait bound i32: Iterator does not depend on any type or lifetime parameters
89   --> $DIR/trivial-bounds-inconsistent.rs:70:25
90    |
91 LL | fn use_for() where i32: Iterator {
92    |                         ^^^^^^^^
93
94 warning: 14 warnings emitted
95