|
| 1 | +error: Trait bound i32: std::marker::Copy does not depend on any type or lifetime parameters |
| 2 | + --> $DIR/trivial-bounds-lint.rs:15:1 |
| 3 | + | |
| 4 | +LL | struct A where i32: Copy; //~ ERROR |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: lint level defined here |
| 8 | + --> $DIR/trivial-bounds-lint.rs:13:9 |
| 9 | + | |
| 10 | +LL | #![deny(trivial_bounds)] |
| 11 | + | ^^^^^^^^^^^^^^ |
| 12 | + |
| 13 | +error: Trait bound i32: X<()> does not depend on any type or lifetime parameters |
| 14 | + --> $DIR/trivial-bounds-lint.rs:28:1 |
| 15 | + | |
| 16 | +LL | fn global_param() where i32: X<()> {} //~ ERROR |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 18 | + |
| 19 | +error: Trait bound i32: Z does not depend on any type or lifetime parameters |
| 20 | + --> $DIR/trivial-bounds-lint.rs:32:1 |
| 21 | + | |
| 22 | +LL | fn global_projection() where i32: Z<S = i32> {} //~ ERROR |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 24 | + |
| 25 | +error: Lifetime bound i32 : 'static does not depend on any type or lifetime parameters |
| 26 | + --> $DIR/trivial-bounds-lint.rs:39:1 |
| 27 | + | |
| 28 | +LL | fn global_lifetimes() where i32: 'static, &'static str: 'static {} |
| 29 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 30 | + |
| 31 | +error: Lifetime bound &'static str : 'static does not depend on any type or lifetime parameters |
| 32 | + --> $DIR/trivial-bounds-lint.rs:39:1 |
| 33 | + | |
| 34 | +LL | fn global_lifetimes() where i32: 'static, &'static str: 'static {} |
| 35 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 36 | + |
| 37 | +error: Lifetime bound 'static : 'static does not depend on any type or lifetime parameters |
| 38 | + --> $DIR/trivial-bounds-lint.rs:45:1 |
| 39 | + | |
| 40 | +LL | fn global_outlives() where 'static: 'static {} //~ ERROR |
| 41 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 42 | + |
| 43 | +error: Trait bound i32: std::marker::Copy does not depend on any type or lifetime parameters |
| 44 | + --> $DIR/trivial-bounds-lint.rs:48:1 |
| 45 | + | |
| 46 | +LL | fn mixed_bounds<T: Copy>() where i32: X<T> + Copy {} //~ ERROR |
| 47 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 48 | + |
| 49 | +error: aborting due to 7 previous errors |
| 50 | + |
0 commit comments