2023-08-24 19:32:12 +00:00
|
|
|
error: this bound is already specified as the supertrait of `DerefMut<Target = T>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:12:36
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn deref_derefmut<T>(x: T) -> impl Deref<Target = T> + DerefMut<Target = T> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::implied-bounds-in-impls` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::implied_bounds_in_impls)]`
|
2023-08-24 19:32:12 +00:00
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn deref_derefmut<T>(x: T) -> impl Deref<Target = T> + DerefMut<Target = T> {
|
|
|
|
LL + fn deref_derefmut<T>(x: T) -> impl DerefMut<Target = T> {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `GenericSubtrait<U, W, U>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:29:37
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn generics_implied<U, W>() -> impl GenericTrait<W> + GenericSubtrait<U, W, U>
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn generics_implied<U, W>() -> impl GenericTrait<W> + GenericSubtrait<U, W, U>
|
|
|
|
LL + fn generics_implied<U, W>() -> impl GenericSubtrait<U, W, U>
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `GenericSubtrait<(), i32, V>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:35:40
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericTrait2<V> + GenericSubtrait<(), i32, V> {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericTrait2<V> + GenericSubtrait<(), i32, V> {}
|
|
|
|
LL + fn generics_implied_multi<V>() -> impl GenericTrait2<V> + GenericSubtrait<(), i32, V> {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `GenericSubtrait<(), i32, V>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:35:60
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericTrait2<V> + GenericSubtrait<(), i32, V> {}
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericTrait2<V> + GenericSubtrait<(), i32, V> {}
|
|
|
|
LL + fn generics_implied_multi<V>() -> impl GenericTrait<i32> + GenericSubtrait<(), i32, V> {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `GenericSubtrait<(), T, V>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:37:44
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericTrait2<V> + GenericSubtrait<(), T, V>
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericTrait2<V> + GenericSubtrait<(), T, V>
|
|
|
|
LL + fn generics_implied_multi2<T, V>() -> impl GenericTrait2<V> + GenericSubtrait<(), T, V>
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `GenericSubtrait<(), T, V>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:37:62
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericTrait2<V> + GenericSubtrait<(), T, V>
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericTrait2<V> + GenericSubtrait<(), T, V>
|
|
|
|
LL + fn generics_implied_multi2<T, V>() -> impl GenericTrait<T> + GenericSubtrait<(), T, V>
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `GenericSubtrait<(), i32, ()>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:47:28
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn generics_same() -> impl GenericTrait<i32> + GenericSubtrait<(), i32, ()> {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn generics_same() -> impl GenericTrait<i32> + GenericSubtrait<(), i32, ()> {}
|
|
|
|
LL + fn generics_same() -> impl GenericSubtrait<(), i32, ()> {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `DerefMut<Target = u8>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:51:20
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn f() -> impl Deref + DerefMut<Target = u8>;
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn f() -> impl Deref + DerefMut<Target = u8>;
|
|
|
|
LL + fn f() -> impl DerefMut<Target = u8>;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `DerefMut<Target = u8>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:56:20
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn f() -> impl Deref + DerefMut<Target = u8> {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn f() -> impl Deref + DerefMut<Target = u8> {
|
|
|
|
LL + fn f() -> impl DerefMut<Target = u8> {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `DerefMut<Target = u8>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:62:20
|
2023-08-24 19:32:12 +00:00
|
|
|
|
|
|
|
|
LL | fn f() -> impl Deref + DerefMut<Target = u8> {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn f() -> impl Deref + DerefMut<Target = u8> {
|
|
|
|
LL + fn f() -> impl DerefMut<Target = u8> {
|
|
|
|
|
|
|
|
|
|
2023-09-12 16:13:53 +00:00
|
|
|
error: this bound is already specified as the supertrait of `PartialOrd`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:73:41
|
2023-09-12 16:13:53 +00:00
|
|
|
|
|
|
|
|
LL | fn default_generic_param1() -> impl PartialEq + PartialOrd + Debug {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn default_generic_param1() -> impl PartialEq + PartialOrd + Debug {}
|
|
|
|
LL + fn default_generic_param1() -> impl PartialOrd + Debug {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `PartialOrd`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:74:54
|
2023-09-12 16:13:53 +00:00
|
|
|
|
|
|
|
|
LL | fn default_generic_param2() -> impl PartialOrd + PartialEq + Debug {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn default_generic_param2() -> impl PartialOrd + PartialEq + Debug {}
|
|
|
|
LL + fn default_generic_param2() -> impl PartialOrd + Debug {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `DoubleEndedIterator`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:87:26
|
2023-09-12 16:13:53 +00:00
|
|
|
|
|
|
|
|
LL | fn my_iter() -> impl Iterator<Item = u32> + DoubleEndedIterator {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn my_iter() -> impl Iterator<Item = u32> + DoubleEndedIterator {
|
|
|
|
LL + fn my_iter() -> impl DoubleEndedIterator<Item = u32> {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `Copy`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:92:27
|
2023-09-12 16:13:53 +00:00
|
|
|
|
|
|
|
|
LL | fn f() -> impl Copy + Clone {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn f() -> impl Copy + Clone {
|
|
|
|
LL + fn f() -> impl Copy {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `Trait2<i32>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:106:21
|
2023-09-12 16:13:53 +00:00
|
|
|
|
|
|
|
|
LL | fn f2() -> impl Trait1<i32, U = i64> + Trait2<i32> {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn f2() -> impl Trait1<i32, U = i64> + Trait2<i32> {}
|
|
|
|
LL + fn f2() -> impl Trait2<i32, U = i64> {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: this bound is already specified as the supertrait of `Trait4<i8, X = i32>`
|
2023-09-13 16:04:42 +00:00
|
|
|
--> $DIR/implied_bounds_in_impls.rs:121:21
|
2023-09-12 16:13:53 +00:00
|
|
|
|
|
|
|
|
LL | fn f3() -> impl Trait3<i8, i16, i64, X = i32, Y = i128> + Trait4<i8, X = i32> {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try removing this bound
|
|
|
|
|
|
|
|
|
LL - fn f3() -> impl Trait3<i8, i16, i64, X = i32, Y = i128> + Trait4<i8, X = i32> {}
|
|
|
|
LL + fn f3() -> impl Trait4<i8, X = i32, Y = i128> {}
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 16 previous errors
|
2023-08-24 19:32:12 +00:00
|
|
|
|