mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-19 17:44:21 +00:00
bb01aca86f
Those lints are trait_duplication_in_bounds and type_repetition_in_bounds. I don't think those can be fixed on the Clippy side alone, but need changes in the compiler. So let's move them to nursery to get the sync through and then fix them on the rustc side. Also adds a regression test that has to be fixed before they can be moved back to pedantic.
79 lines
2.4 KiB
Text
79 lines
2.4 KiB
Text
error: this trait bound is already specified in the where clause
|
|
--> $DIR/trait_duplication_in_bounds.rs:6:15
|
|
|
|
|
LL | fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
|
|
| ^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/trait_duplication_in_bounds.rs:1:9
|
|
|
|
|
LL | #![deny(clippy::trait_duplication_in_bounds)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in the where clause
|
|
--> $DIR/trait_duplication_in_bounds.rs:6:23
|
|
|
|
|
LL | fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
|
|
| ^^^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in trait declaration
|
|
--> $DIR/trait_duplication_in_bounds.rs:35:15
|
|
|
|
|
LL | Self: Default;
|
|
| ^^^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in trait declaration
|
|
--> $DIR/trait_duplication_in_bounds.rs:49:15
|
|
|
|
|
LL | Self: Default + Clone;
|
|
| ^^^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in trait declaration
|
|
--> $DIR/trait_duplication_in_bounds.rs:55:15
|
|
|
|
|
LL | Self: Default + Clone;
|
|
| ^^^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in trait declaration
|
|
--> $DIR/trait_duplication_in_bounds.rs:55:25
|
|
|
|
|
LL | Self: Default + Clone;
|
|
| ^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in trait declaration
|
|
--> $DIR/trait_duplication_in_bounds.rs:58:15
|
|
|
|
|
LL | Self: Default;
|
|
| ^^^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in trait declaration
|
|
--> $DIR/trait_duplication_in_bounds.rs:93:15
|
|
|
|
|
LL | Self: Iterator<Item = Foo>,
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: this trait bound is already specified in the where clause
|
|
--> $DIR/trait_duplication_in_bounds.rs:99:23
|
|
|
|
|
LL | fn impl_trait(_: impl AsRef<str>, _: impl AsRef<str>) {}
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: consider removing this trait bound
|
|
|
|
error: aborting due to 9 previous errors
|
|
|