summaryrefslogtreecommitdiffstats
path: root/tests/ui/auto-traits/suspicious-negative-impls-lint.stderr
blob: ee03ea1255757d539112549235b04d1721be4919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
error: cross-crate traits with a default impl, like `Send`, should not be specialized
  --> $DIR/suspicious-negative-impls-lint.rs:7:1
   |
LL | impl !Send for ContainsVec<u32> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this will change its meaning in a future release!
   = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
   = note: `u32` is not a generic parameter
note: try using the same sequence of generic parameters as the struct definition
  --> $DIR/suspicious-negative-impls-lint.rs:6:1
   |
LL | struct ContainsVec<T>(Vec<T>);
   | ^^^^^^^^^^^^^^^^^^^^^
note: the lint level is defined here
  --> $DIR/suspicious-negative-impls-lint.rs:2:9
   |
LL | #![deny(suspicious_auto_trait_impls)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: cross-crate traits with a default impl, like `Send`, should not be specialized
  --> $DIR/suspicious-negative-impls-lint.rs:12:1
   |
LL | impl<T> !Send for WithPhantomDataSend<*const T, u8> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this will change its meaning in a future release!
   = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
   = note: `*const T` is not a generic parameter
note: try using the same sequence of generic parameters as the struct definition
  --> $DIR/suspicious-negative-impls-lint.rs:11:1
   |
LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: cross-crate traits with a default impl, like `Sync`, should not be specialized
  --> $DIR/suspicious-negative-impls-lint.rs:17:1
   |
LL | impl<T> !Sync for WithLifetime<'static, Option<T>> {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = warning: this will change its meaning in a future release!
   = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
   = note: `Option<T>` is not a generic parameter
note: try using the same sequence of generic parameters as the struct definition
  --> $DIR/suspicious-negative-impls-lint.rs:16:1
   |
LL | pub struct WithLifetime<'a, T>(&'a (), T);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors