fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.2 KiB52 linesraw
1error: cross-crate traits with a default impl, like `Send`, should not be specialized
2  --> $DIR/suspicious-negative-impls-lint.rs:7:1
3   |
4LL | impl !Send for ContainsVec<u32> {}
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: `u32` is not a generic parameter
10note: try using the same sequence of generic parameters as the struct definition
11  --> $DIR/suspicious-negative-impls-lint.rs:6:1
12   |
13LL | struct ContainsVec<T>(Vec<T>);
14   | ^^^^^^^^^^^^^^^^^^^^^
15note: the lint level is defined here
16  --> $DIR/suspicious-negative-impls-lint.rs:2:9
17   |
18LL | #![deny(suspicious_auto_trait_impls)]
19   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
21error: cross-crate traits with a default impl, like `Send`, should not be specialized
22  --> $DIR/suspicious-negative-impls-lint.rs:12:1
23   |
24LL | impl<T> !Send for WithPhantomDataSend<*const T, u8> {}
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: `*const T` is not a generic parameter
30note: try using the same sequence of generic parameters as the struct definition
31  --> $DIR/suspicious-negative-impls-lint.rs:11:1
32   |
33LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
34   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35
36error: cross-crate traits with a default impl, like `Sync`, should not be specialized
37  --> $DIR/suspicious-negative-impls-lint.rs:17:1
38   |
39LL | impl<T> !Sync for WithLifetime<'static, Option<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: `Option<T>` is not a generic parameter
45note: try using the same sequence of generic parameters as the struct definition
46  --> $DIR/suspicious-negative-impls-lint.rs:16:1
47   |
48LL | pub struct WithLifetime<'a, T>(&'a (), T);
49   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50
51error: aborting due to 3 previous errors
52