]> git.lizzy.rs Git - rust.git/blob - tests/ui/auto-traits/suspicious-impls-lint.stderr
Rollup merge of #106762 - WaffleLapkin:atomicptr+as_mut_ptr, r=m-ou-se
[rust.git] / tests / ui / auto-traits / suspicious-impls-lint.stderr
1 error: cross-crate traits with a default impl, like `Send`, should not be specialized
2   --> $DIR/suspicious-impls-lint.rs:9:1
3    |
4 LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
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
12    |
13 LL | struct MayImplementSendErr<T>(T);
14    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 note: the lint level is defined here
16   --> $DIR/suspicious-impls-lint.rs:1:9
17    |
18 LL | #![deny(suspicious_auto_trait_impls)]
19    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
21 error: cross-crate traits with a default impl, like `Send`, should not be specialized
22   --> $DIR/suspicious-impls-lint.rs:21:1
23    |
24 LL | unsafe impl Send for ContainsVec<i32> {}
25    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26    |
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
32    |
33 LL | struct ContainsVec<T>(Vec<T>);
34    | ^^^^^^^^^^^^^^^^^^^^^
35
36 error: cross-crate traits with a default impl, like `Send`, should not be specialized
37   --> $DIR/suspicious-impls-lint.rs:32:1
38    |
39 LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
40    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41    |
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
47    |
48 LL | struct TwoParamsSame<T, U>(T, U);
49    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
50
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: `*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
62    |
63 LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
64    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65
66 error: cross-crate traits with a default impl, like `Sync`, should not be specialized
67   --> $DIR/suspicious-impls-lint.rs:46:1
68    |
69 LL | unsafe impl<T> Sync for WithLifetime<'static, Vec<T>> {}
70    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71    |
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
77    |
78 LL | pub struct WithLifetime<'a, T>(&'a (), T);
79    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
81 error: aborting due to 5 previous errors
82