11error: cross-crate traits with a default impl, like `Send`, should not be specialized
2- --> $DIR/suspicious-impls-lint.rs:7 :1
2+ --> $DIR/suspicious-impls-lint.rs:9 :1
33 |
44LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,41 +12,56 @@ LL | #![deny(suspicious_auto_trait_impls)]
1212 = warning: this will change its meaning in a future release!
1313 = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
1414note: try using the same sequence of generic parameters as the struct definition
15- --> $DIR/suspicious-impls-lint.rs:6 :1
15+ --> $DIR/suspicious-impls-lint.rs:8 :1
1616 |
1717LL | struct MayImplementSendErr<T>(T);
1818 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1919 = note: `&T` is not a generic parameter
2020
2121error: cross-crate traits with a default impl, like `Send`, should not be specialized
22- --> $DIR/suspicious-impls-lint.rs:19 :1
22+ --> $DIR/suspicious-impls-lint.rs:21 :1
2323 |
2424LL | unsafe impl Send for ContainsVec<i32> {}
2525 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2626 |
2727 = warning: this will change its meaning in a future release!
2828 = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
2929note: try using the same sequence of generic parameters as the struct definition
30- --> $DIR/suspicious-impls-lint.rs:18 :1
30+ --> $DIR/suspicious-impls-lint.rs:20 :1
3131 |
3232LL | struct ContainsVec<T>(Vec<T>);
3333 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3434 = note: `i32` is not a generic parameter
3535
3636error: cross-crate traits with a default impl, like `Send`, should not be specialized
37- --> $DIR/suspicious-impls-lint.rs:30 :1
37+ --> $DIR/suspicious-impls-lint.rs:32 :1
3838 |
3939LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
4040 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4141 |
4242 = warning: this will change its meaning in a future release!
4343 = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
4444note: try using the same sequence of generic parameters as the struct definition
45- --> $DIR/suspicious-impls-lint.rs:29 :1
45+ --> $DIR/suspicious-impls-lint.rs:31 :1
4646 |
4747LL | struct TwoParamsSame<T, U>(T, U);
4848 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4949 = note: `T` is mentioned multiple times
5050
51- error: aborting due to 3 previous errors
51+ error: cross-crate traits with a default impl, like `Send`, should not be specialized
52+ --> $DIR/suspicious-impls-lint.rs:40:1
53+ |
54+ LL | unsafe impl<T> Send for WithPhantomDataSend<*const T, i8> {}
55+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56+ |
57+ = warning: this will change its meaning in a future release!
58+ = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
59+ note: try using the same sequence of generic parameters as the struct definition
60+ --> $DIR/suspicious-impls-lint.rs:39:1
61+ |
62+ LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
63+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+ = note: `*const T` is not a generic parameter
65+
66+ error: aborting due to 4 previous errors
5267
0 commit comments