1
1
error: 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
3
3
|
4
4
LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,41 +12,56 @@ LL | #![deny(suspicious_auto_trait_impls)]
12
12
= warning: this will change its meaning in a future release!
13
13
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
14
14
note: 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
16
16
|
17
17
LL | struct MayImplementSendErr<T>(T);
18
18
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
19
= note: `&T` is not a generic parameter
20
20
21
21
error: 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
23
23
|
24
24
LL | unsafe impl Send for ContainsVec<i32> {}
25
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26
26
|
27
27
= warning: this will change its meaning in a future release!
28
28
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
29
29
note: 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
31
31
|
32
32
LL | struct ContainsVec<T>(Vec<T>);
33
33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
34
= note: `i32` is not a generic parameter
35
35
36
36
error: 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
38
38
|
39
39
LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
40
40
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41
41
|
42
42
= warning: this will change its meaning in a future release!
43
43
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
44
44
note: 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
46
46
|
47
47
LL | struct TwoParamsSame<T, U>(T, U);
48
48
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
49
= note: `T` is mentioned multiple times
50
50
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
52
67
0 commit comments