1 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
2 --> $DIR/trivial-bounds-inconsistent.rs:24:1
4 LL | enum E where i32: Foo { V }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: #[warn(trivial_bounds)] on by default
9 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
10 --> $DIR/trivial-bounds-inconsistent.rs:26:1
12 LL | struct S where i32: Foo;
13 | ^^^^^^^^^^^^^^^^^^^^^^^^
15 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
16 --> $DIR/trivial-bounds-inconsistent.rs:28:1
18 LL | trait T where i32: Foo {}
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^
21 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
22 --> $DIR/trivial-bounds-inconsistent.rs:30:1
24 LL | union U where i32: Foo { f: i32 }
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 warning: where clauses are not enforced in type aliases
28 --> $DIR/trivial-bounds-inconsistent.rs:32:14
30 LL | type Y where i32: Foo = ();
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
36 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
37 --> $DIR/trivial-bounds-inconsistent.rs:32:1
39 LL | type Y where i32: Foo = ();
40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
43 --> $DIR/trivial-bounds-inconsistent.rs:34:1
45 LL | / impl Foo for () where i32: Foo {
46 LL | | fn test(&self) {
48 LL | | Foo::test(&4i32);
49 LL | | generic_function(5i32);
54 warning: Trait bound i32: Foo does not depend on any type or lifetime parameters
55 --> $DIR/trivial-bounds-inconsistent.rs:42:1
57 LL | / fn f() where i32: Foo {
60 LL | | Foo::test(&4i32);
61 LL | | generic_function(5i32);
65 warning: Trait bound &'static str: Foo does not depend on any type or lifetime parameters
66 --> $DIR/trivial-bounds-inconsistent.rs:49:1
68 LL | / fn g() where &'static str: Foo {
70 LL | | Foo::test(&"Foo");
71 LL | | generic_function("Foo");
75 warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
76 --> $DIR/trivial-bounds-inconsistent.rs:63:1
78 LL | struct TwoStrs(str, str) where str: Sized;
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 warning: Trait bound for<'a> Dst<A + 'a>: std::marker::Sized does not depend on any type or lifetime parameters
82 --> $DIR/trivial-bounds-inconsistent.rs:65:1
84 LL | / fn unsized_local() where for<'a> Dst<A + 'a>: Sized {
85 LL | | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
89 warning: Trait bound str: std::marker::Sized does not depend on any type or lifetime parameters
90 --> $DIR/trivial-bounds-inconsistent.rs:69:1
92 LL | / fn return_str() -> str where str: Sized {
93 LL | | *"Sized".to_string().into_boxed_str()
97 warning: Trait bound std::string::String: std::ops::Neg does not depend on any type or lifetime parameters
98 --> $DIR/trivial-bounds-inconsistent.rs:73:1
100 LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> {
105 warning: Trait bound i32: std::iter::Iterator does not depend on any type or lifetime parameters
106 --> $DIR/trivial-bounds-inconsistent.rs:77:1
108 LL | / fn use_for() where i32: Iterator {
109 LL | | for _ in 2i32 {}