1
1
error: cross-crate traits with a default impl, like `Send`, should not be specialized
2
- --> $DIR/suspicious-impls-lint.rs:9 :1
2
+ --> $DIR/suspicious-impls-lint.rs:10 :1
3
3
|
4
4
LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,18 +8,18 @@ LL | unsafe impl<T: Send> Send for MayImplementSendErr<&T> {}
8
8
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
9
9
= note: `&T` is not a generic parameter
10
10
note: try using the same sequence of generic parameters as the struct definition
11
- --> $DIR/suspicious-impls-lint.rs:8 :1
11
+ --> $DIR/suspicious-impls-lint.rs:9 :1
12
12
|
13
13
LL | struct MayImplementSendErr<T>(T);
14
14
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
15
note: the lint level is defined here
16
- --> $DIR/suspicious-impls-lint.rs:1 :9
16
+ --> $DIR/suspicious-impls-lint.rs:2 :9
17
17
|
18
18
LL | #![deny(suspicious_auto_trait_impls)]
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
20
21
21
error: cross-crate traits with a default impl, like `Send`, should not be specialized
22
- --> $DIR/suspicious-impls-lint.rs:21 :1
22
+ --> $DIR/suspicious-impls-lint.rs:22 :1
23
23
|
24
24
LL | unsafe impl Send for ContainsVec<i32> {}
25
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -28,13 +28,28 @@ LL | unsafe impl Send for ContainsVec<i32> {}
28
28
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
29
29
= note: `i32` is not a generic parameter
30
30
note: try using the same sequence of generic parameters as the struct definition
31
- --> $DIR/suspicious-impls-lint.rs:20 :1
31
+ --> $DIR/suspicious-impls-lint.rs:21 :1
32
32
|
33
33
LL | struct ContainsVec<T>(Vec<T>);
34
34
| ^^^^^^^^^^^^^^^^^^^^^
35
35
36
36
error: cross-crate traits with a default impl, like `Send`, should not be specialized
37
- --> $DIR/suspicious-impls-lint.rs:32:1
37
+ --> $DIR/suspicious-impls-lint.rs:25:1
38
+ |
39
+ LL | impl !Send for ContainsVec<u32> {}
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: `u32` is not a generic parameter
45
+ note: try using the same sequence of generic parameters as the struct definition
46
+ --> $DIR/suspicious-impls-lint.rs:21:1
47
+ |
48
+ LL | struct ContainsVec<T>(Vec<T>);
49
+ | ^^^^^^^^^^^^^^^^^^^^^
50
+
51
+ error: cross-crate traits with a default impl, like `Send`, should not be specialized
52
+ --> $DIR/suspicious-impls-lint.rs:36:1
38
53
|
39
54
LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
40
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -43,13 +58,13 @@ LL | unsafe impl<T: Send> Send for TwoParamsSame<T, T> {}
43
58
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
44
59
= note: `T` is mentioned multiple times
45
60
note: try using the same sequence of generic parameters as the struct definition
46
- --> $DIR/suspicious-impls-lint.rs:31 :1
61
+ --> $DIR/suspicious-impls-lint.rs:35 :1
47
62
|
48
63
LL | struct TwoParamsSame<T, U>(T, U);
49
64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
50
65
51
66
error: cross-crate traits with a default impl, like `Send`, should not be specialized
52
- --> $DIR/suspicious-impls-lint.rs:40 :1
67
+ --> $DIR/suspicious-impls-lint.rs:44 :1
53
68
|
54
69
LL | unsafe impl<T> Send for WithPhantomDataSend<*const T, i8> {}
55
70
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -58,13 +73,28 @@ LL | unsafe impl<T> Send for WithPhantomDataSend<*const T, i8> {}
58
73
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
59
74
= note: `*const T` is not a generic parameter
60
75
note: try using the same sequence of generic parameters as the struct definition
61
- --> $DIR/suspicious-impls-lint.rs:39:1
76
+ --> $DIR/suspicious-impls-lint.rs:43:1
77
+ |
78
+ LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
79
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
+
81
+ error: cross-crate traits with a default impl, like `Send`, should not be specialized
82
+ --> $DIR/suspicious-impls-lint.rs:47:1
83
+ |
84
+ LL | impl<T> !Send for WithPhantomDataSend<*const T, u8> {}
85
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86
+ |
87
+ = warning: this will change its meaning in a future release!
88
+ = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
89
+ = note: `*const T` is not a generic parameter
90
+ note: try using the same sequence of generic parameters as the struct definition
91
+ --> $DIR/suspicious-impls-lint.rs:43:1
62
92
|
63
93
LL | pub struct WithPhantomDataSend<T, U>(PhantomData<T>, U);
64
94
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65
95
66
96
error: cross-crate traits with a default impl, like `Sync`, should not be specialized
67
- --> $DIR/suspicious-impls-lint.rs:46 :1
97
+ --> $DIR/suspicious-impls-lint.rs:53 :1
68
98
|
69
99
LL | unsafe impl<T> Sync for WithLifetime<'static, Vec<T>> {}
70
100
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -73,10 +103,25 @@ LL | unsafe impl<T> Sync for WithLifetime<'static, Vec<T>> {}
73
103
= note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
74
104
= note: `Vec<T>` is not a generic parameter
75
105
note: try using the same sequence of generic parameters as the struct definition
76
- --> $DIR/suspicious-impls-lint.rs:44:1
106
+ --> $DIR/suspicious-impls-lint.rs:51:1
107
+ |
108
+ LL | pub struct WithLifetime<'a, T>(&'a (), T);
109
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110
+
111
+ error: cross-crate traits with a default impl, like `Sync`, should not be specialized
112
+ --> $DIR/suspicious-impls-lint.rs:56:1
113
+ |
114
+ LL | impl<T> !Sync for WithLifetime<'static, Option<T>> {}
115
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
+ |
117
+ = warning: this will change its meaning in a future release!
118
+ = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
119
+ = note: `Option<T>` is not a generic parameter
120
+ note: try using the same sequence of generic parameters as the struct definition
121
+ --> $DIR/suspicious-impls-lint.rs:51:1
77
122
|
78
123
LL | pub struct WithLifetime<'a, T>(&'a (), T);
79
124
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
125
81
- error: aborting due to 5 previous errors
126
+ error: aborting due to 8 previous errors
82
127
0 commit comments