]>
Commit | Line | Data |
---|---|---|
c295e0f8 | 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 | 6 | | |
416331ca | 7 | = note: `#[warn(trivial_bounds)]` on by default |
94b46f34 | 8 | |
c295e0f8 | 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 | 14 | |
c295e0f8 | 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 | 20 | |
c295e0f8 | 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 | | | |
416331ca | 33 | = note: `#[warn(type_alias_bounds)]` on by default |
e74abb32 XL |
34 | help: the clause will not be checked when the type alias is used, and should be removed |
35 | | | |
94222f64 XL |
36 | LL - type Y where i32: Foo = (); |
37 | LL + type Y = (); | |
923072b8 | 38 | | |
94b46f34 | 39 | |
c295e0f8 | 40 | warning: trait bound i32: Foo does not depend on any type or lifetime parameters |
0731742a | 41 | --> $DIR/trivial-bounds-inconsistent.rs:22:19 |
94b46f34 XL |
42 | | |
43 | LL | type Y where i32: Foo = (); | |
0bf4aa26 | 44 | | ^^^ |
94b46f34 | 45 | |
c295e0f8 | 46 | warning: trait bound i32: Foo does not depend on any type or lifetime parameters |
60c5eb7d | 47 | --> $DIR/trivial-bounds-inconsistent.rs:26:28 |
0bf4aa26 XL |
48 | | |
49 | LL | impl Foo for () where i32: Foo { | |
50 | | ^^^ | |
94b46f34 | 51 | |
c295e0f8 | 52 | warning: trait bound i32: Foo does not depend on any type or lifetime parameters |
60c5eb7d | 53 | --> $DIR/trivial-bounds-inconsistent.rs:34:19 |
0bf4aa26 XL |
54 | | |
55 | LL | fn f() where i32: Foo { | |
56 | | ^^^ | |
94b46f34 | 57 | |
c295e0f8 | 58 | warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters |
60c5eb7d | 59 | --> $DIR/trivial-bounds-inconsistent.rs:41:28 |
0bf4aa26 XL |
60 | | |
61 | LL | fn g() where &'static str: Foo { | |
62 | | ^^^ | |
94b46f34 | 63 | |
c295e0f8 | 64 | warning: trait bound str: Sized does not depend on any type or lifetime parameters |
60c5eb7d | 65 | --> $DIR/trivial-bounds-inconsistent.rs:55:37 |
94b46f34 XL |
66 | | |
67 | LL | struct TwoStrs(str, str) where str: Sized; | |
0bf4aa26 | 68 | | ^^^^^ |
94b46f34 | 69 | |
c295e0f8 | 70 | warning: trait bound for<'a> Dst<(dyn A + 'a)>: Sized does not depend on any type or lifetime parameters |
60c5eb7d | 71 | --> $DIR/trivial-bounds-inconsistent.rs:57:51 |
94b46f34 | 72 | | |
dc9dc135 XL |
73 | LL | fn unsized_local() where for<'a> Dst<dyn A + 'a>: Sized { |
74 | | ^^^^^ | |
94b46f34 | 75 | |
c295e0f8 | 76 | warning: trait bound str: Sized does not depend on any type or lifetime parameters |
60c5eb7d | 77 | --> $DIR/trivial-bounds-inconsistent.rs:61:35 |
94b46f34 | 78 | | |
0bf4aa26 XL |
79 | LL | fn return_str() -> str where str: Sized { |
80 | | ^^^^^ | |
94b46f34 | 81 | |
c295e0f8 | 82 | warning: trait bound String: Neg does not depend on any type or lifetime parameters |
60c5eb7d | 83 | --> $DIR/trivial-bounds-inconsistent.rs:65:46 |
94b46f34 | 84 | | |
0bf4aa26 XL |
85 | LL | fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> { |
86 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
94b46f34 | 87 | |
c295e0f8 | 88 | warning: trait bound i32: Iterator does not depend on any type or lifetime parameters |
60c5eb7d | 89 | --> $DIR/trivial-bounds-inconsistent.rs:70:25 |
94b46f34 | 90 | | |
0bf4aa26 XL |
91 | LL | fn use_for() where i32: Iterator { |
92 | | ^^^^^^^^ | |
94b46f34 | 93 | |
ba9703b0 XL |
94 | warning: 14 warnings emitted |
95 |