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