]>
Commit | Line | Data |
---|---|---|
94b46f34 | 1 | warning: Trait bound i32: Foo does not depend on any type or lifetime parameters |
0731742a | 2 | --> $DIR/trivial-bounds-inconsistent.rs:14:19 |
94b46f34 XL |
3 | | |
4 | LL | enum E where i32: Foo { V } | |
0bf4aa26 | 5 | | ^^^ |
94b46f34 XL |
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 | |
0731742a | 10 | --> $DIR/trivial-bounds-inconsistent.rs:16:21 |
94b46f34 XL |
11 | | |
12 | LL | struct S where i32: Foo; | |
0bf4aa26 | 13 | | ^^^ |
94b46f34 XL |
14 | |
15 | warning: Trait bound i32: Foo does not depend on any type or lifetime parameters | |
0731742a | 16 | --> $DIR/trivial-bounds-inconsistent.rs:18:20 |
94b46f34 XL |
17 | | |
18 | LL | trait T where i32: Foo {} | |
0bf4aa26 | 19 | | ^^^ |
94b46f34 XL |
20 | |
21 | warning: Trait bound i32: Foo does not depend on any type or lifetime parameters | |
0731742a | 22 | --> $DIR/trivial-bounds-inconsistent.rs:20:20 |
94b46f34 XL |
23 | | |
24 | LL | union U where i32: Foo { f: i32 } | |
0bf4aa26 | 25 | | ^^^ |
94b46f34 XL |
26 | |
27 | warning: where clauses are not enforced in type aliases | |
0731742a | 28 | --> $DIR/trivial-bounds-inconsistent.rs:22:14 |
94b46f34 XL |
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 | warning: Trait bound i32: Foo does not depend on any type or lifetime parameters | |
0731742a | 37 | --> $DIR/trivial-bounds-inconsistent.rs:22:19 |
94b46f34 XL |
38 | | |
39 | LL | type Y where i32: Foo = (); | |
0bf4aa26 | 40 | | ^^^ |
94b46f34 XL |
41 | |
42 | warning: Trait bound i32: Foo does not depend on any type or lifetime parameters | |
0731742a | 43 | --> $DIR/trivial-bounds-inconsistent.rs:24:28 |
0bf4aa26 XL |
44 | | |
45 | LL | impl Foo for () where i32: Foo { | |
46 | | ^^^ | |
94b46f34 XL |
47 | |
48 | warning: Trait bound i32: Foo does not depend on any type or lifetime parameters | |
0731742a | 49 | --> $DIR/trivial-bounds-inconsistent.rs:32:19 |
0bf4aa26 XL |
50 | | |
51 | LL | fn f() where i32: Foo { | |
52 | | ^^^ | |
94b46f34 XL |
53 | |
54 | warning: Trait bound &'static str: Foo does not depend on any type or lifetime parameters | |
0731742a | 55 | --> $DIR/trivial-bounds-inconsistent.rs:39:28 |
0bf4aa26 XL |
56 | | |
57 | LL | fn g() where &'static str: Foo { | |
58 | | ^^^ | |
94b46f34 XL |
59 | |
60 | warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters | |
0731742a | 61 | --> $DIR/trivial-bounds-inconsistent.rs:53:37 |
94b46f34 XL |
62 | | |
63 | LL | struct TwoStrs(str, str) where str: Sized; | |
0bf4aa26 | 64 | | ^^^^^ |
94b46f34 | 65 | |
8faf50e0 | 66 | warning: Trait bound for<'a> Dst<(dyn A + 'a)>: std::marker::Sized does not depend on any type or lifetime parameters |
0731742a | 67 | --> $DIR/trivial-bounds-inconsistent.rs:55:47 |
94b46f34 | 68 | | |
0bf4aa26 XL |
69 | LL | fn unsized_local() where for<'a> Dst<A + 'a>: Sized { |
70 | | ^^^^^ | |
94b46f34 XL |
71 | |
72 | warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters | |
0731742a | 73 | --> $DIR/trivial-bounds-inconsistent.rs:59:35 |
94b46f34 | 74 | | |
0bf4aa26 XL |
75 | LL | fn return_str() -> str where str: Sized { |
76 | | ^^^^^ | |
94b46f34 XL |
77 | |
78 | warning: Trait bound std::string::String: std::ops::Neg does not depend on any type or lifetime parameters | |
0731742a | 79 | --> $DIR/trivial-bounds-inconsistent.rs:63:46 |
94b46f34 | 80 | | |
0bf4aa26 XL |
81 | LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> { |
82 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
94b46f34 XL |
83 | |
84 | warning: Trait bound i32: std::iter::Iterator does not depend on any type or lifetime parameters | |
0731742a | 85 | --> $DIR/trivial-bounds-inconsistent.rs:67:25 |
94b46f34 | 86 | | |
0bf4aa26 XL |
87 | LL | fn use_for() where i32: Iterator { |
88 | | ^^^^^^^^ | |
94b46f34 | 89 |