1 error: cross-crate traits with a default impl, like `Send`, should not be specialized
2 --> $DIR/suspicious-impls-lint.rs:9:1
4 LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = warning: this will change its meaning in a future release!
8 = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
9 = note: `&T` is not a generic parameter
10 note: try using the same sequence of generic parameters as the struct definition
11 --> $DIR/suspicious-impls-lint.rs:8:1
13 LL | struct MayImplementSendErr<T>(T);
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 note: the lint level is defined here
16 --> $DIR/suspicious-impls-lint.rs:1:9
18 LL | #![deny(suspicious_auto_trait_impls)]
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 error: cross-crate traits with a default impl, like `Send`, should not be specialized
22 --> $DIR/suspicious-impls-lint.rs:21:1
24 LL | unsafe impl Send for ContainsVec<i32> {}
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 = warning: this will change its meaning in a future release!
28 = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
29 = note: `i32` is not a generic parameter
30 note: try using the same sequence of generic parameters as the struct definition
31 --> $DIR/suspicious-impls-lint.rs:20:1
33 LL | struct ContainsVec<T>(Vec<T>);
34 | ^^^^^^^^^^^^^^^^^^^^^
36 error: cross-crate traits with a default impl, like `Send`, should not be specialized
37 --> $DIR/suspicious-impls-lint.rs:32:1
39 LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 = warning: this will change its meaning in a future release!
43 = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
44 = note: `T` is mentioned multiple times
45 note: try using the same sequence of generic parameters as the struct definition
46 --> $DIR/suspicious-impls-lint.rs:31:1
48 LL | struct TwoParamsSame<T, U>(T, U);
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
51 error: cross-crate traits with a default impl, like `Send`, should not be specialized
52 --> $DIR/suspicious-impls-lint.rs:40:1
54 LL | unsafe impl<T> Send for WithPhantomDataSend<*const T, i8> {}
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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: `*const T` is not a generic parameter
60 note: try using the same sequence of generic parameters as the struct definition
61 --> $DIR/suspicious-impls-lint.rs:39:1
63 LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66 error: cross-crate traits with a default impl, like `Sync`, should not be specialized
67 --> $DIR/suspicious-impls-lint.rs:46:1
69 LL | unsafe impl<T> Sync for WithLifetime<'static, Vec<T>> {}
70 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72 = warning: this will change its meaning in a future release!
73 = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
74 = note: `Vec<T>` is not a generic parameter
75 note: try using the same sequence of generic parameters as the struct definition
76 --> $DIR/suspicious-impls-lint.rs:44:1
78 LL | pub struct WithLifetime<'a, T>(&'a (), T);
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 error: aborting due to 5 previous errors