You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #132157 - estebank:long-types-3, r=jieyouxu
Remove detail from label/note that is already available in other note
Remove the "which is required by `{root_obligation}`" post-script in
"the trait `X` is not implemented for `Y`" explanation in E0277. This
information is already conveyed in the notes explaining requirements,
making it redundant while making the text (particularly in labels)
harder to read.
```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
--> $DIR/wf-static-type.rs:10:13
|
LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`
|
= note: required for `Option<NotCopy>` to implement `Copy`
note: required by a bound in `IsCopy`
--> $DIR/wf-static-type.rs:7:17
|
LL | struct IsCopy<T:Copy> { t: T }
| ^^^^ required by this bound in `IsCopy`
```
vs the prior
```
error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
--> $DIR/wf-static-type.rs:10:13
|
LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy`
|
= note: required for `Option<NotCopy>` to implement `Copy`
note: required by a bound in `IsCopy`
--> $DIR/wf-static-type.rs:7:17
|
LL | struct IsCopy<T:Copy> { t: T }
| ^^^^ required by this bound in `IsCopy`
```
*Ignore first three commits from #132086
Copy file name to clipboardExpand all lines: tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ error: future cannot be sent between threads safely
4
4
LL | is_send(foo::<T>());
5
5
| ^^^^^^^^^^ future returned by `foo` is not `Send`
6
6
|
7
-
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method(..) }`, which is required by `impl Future<Output = Result<(), ()>>: Send`
7
+
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method(..) }`
8
8
note: future is not `Send` as it awaits another future which is not `Send`
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Vec<T> as Cycle>::Next as X<'b, <Vec<T> as Cycle>::Next>>::U: Clone`
5
+
| ^^^ the trait `Clone` is not implemented for `str`
6
6
|
7
7
= help: the trait `Clone` is implemented for `String`
8
8
note: required by a bound in `X`
@@ -18,7 +18,7 @@ error[E0277]: the trait bound `str: Clone` is not satisfied
| ^^^ the trait `Clone` is not implemented for `str`, which is required by `for<'b> <<Box<T> as Cycle>::Next as X<'b, <Box<T> as Cycle>::Next>>::U: Clone`
21
+
| ^^^ the trait `Clone` is not implemented for `str`
22
22
|
23
23
= help: the trait `Clone` is implemented for `String`
Copy file name to clipboardExpand all lines: tests/ui/associated-types/issue-38821.stderr
+18-18
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
2
2
--> $DIR/issue-38821.rs:40:1
3
3
|
4
4
LL | pub enum ColumnInsertValue<Col, Expr> where
5
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
6
6
|
7
7
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
8
8
--> $DIR/issue-38821.rs:9:18
@@ -26,7 +26,7 @@ LL | | Col: Column,
26
26
... |
27
27
LL | | Default(Col),
28
28
LL | | }
29
-
| |_^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
29
+
| |_^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
30
30
|
31
31
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
32
32
--> $DIR/issue-38821.rs:9:18
@@ -44,7 +44,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
44
44
--> $DIR/issue-38821.rs:23:10
45
45
|
46
46
LL | #[derive(Debug, Copy, Clone)]
47
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
47
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
48
48
|
49
49
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
50
50
--> $DIR/issue-38821.rs:9:18
@@ -63,7 +63,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
63
63
--> $DIR/issue-38821.rs:23:10
64
64
|
65
65
LL | #[derive(Debug, Copy, Clone)]
66
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
66
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
67
67
|
68
68
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
69
69
--> $DIR/issue-38821.rs:9:18
@@ -83,7 +83,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
83
83
--> $DIR/issue-38821.rs:23:10
84
84
|
85
85
LL | #[derive(Debug, Copy, Clone)]
86
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
86
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
87
87
|
88
88
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
89
89
--> $DIR/issue-38821.rs:9:18
@@ -98,7 +98,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
98
98
--> $DIR/issue-38821.rs:23:10
99
99
|
100
100
LL | #[derive(Debug, Copy, Clone)]
101
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
101
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
102
102
|
103
103
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
104
104
--> $DIR/issue-38821.rs:9:18
@@ -114,7 +114,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
114
114
--> $DIR/issue-38821.rs:23:17
115
115
|
116
116
LL | #[derive(Debug, Copy, Clone)]
117
-
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
117
+
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
118
118
|
119
119
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
120
120
--> $DIR/issue-38821.rs:9:18
@@ -133,7 +133,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
133
133
--> $DIR/issue-38821.rs:23:17
134
134
|
135
135
LL | #[derive(Debug, Copy, Clone)]
136
-
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
136
+
| ^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
137
137
|
138
138
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
139
139
--> $DIR/issue-38821.rs:9:18
@@ -153,7 +153,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
153
153
--> $DIR/issue-38821.rs:23:23
154
154
|
155
155
LL | #[derive(Debug, Copy, Clone)]
156
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
156
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
157
157
|
158
158
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
159
159
--> $DIR/issue-38821.rs:9:18
@@ -172,7 +172,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
172
172
--> $DIR/issue-38821.rs:23:23
173
173
|
174
174
LL | #[derive(Debug, Copy, Clone)]
175
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
175
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
176
176
|
177
177
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
178
178
--> $DIR/issue-38821.rs:9:18
@@ -192,7 +192,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
192
192
--> $DIR/issue-38821.rs:23:23
193
193
|
194
194
LL | #[derive(Debug, Copy, Clone)]
195
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
195
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
196
196
|
197
197
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
198
198
--> $DIR/issue-38821.rs:9:18
@@ -207,7 +207,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
207
207
--> $DIR/issue-38821.rs:23:23
208
208
|
209
209
LL | #[derive(Debug, Copy, Clone)]
210
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
210
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
211
211
|
212
212
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
213
213
--> $DIR/issue-38821.rs:9:18
@@ -223,7 +223,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
223
223
--> $DIR/issue-38821.rs:23:10
224
224
|
225
225
LL | #[derive(Debug, Copy, Clone)]
226
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
226
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
227
227
|
228
228
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
229
229
--> $DIR/issue-38821.rs:9:18
@@ -239,7 +239,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
239
239
--> $DIR/issue-38821.rs:23:10
240
240
|
241
241
LL | #[derive(Debug, Copy, Clone)]
242
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
242
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
243
243
|
244
244
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
245
245
--> $DIR/issue-38821.rs:9:18
@@ -255,7 +255,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
255
255
--> $DIR/issue-38821.rs:23:23
256
256
|
257
257
LL | #[derive(Debug, Copy, Clone)]
258
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
258
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
259
259
|
260
260
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
261
261
--> $DIR/issue-38821.rs:9:18
@@ -271,7 +271,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
271
271
--> $DIR/issue-38821.rs:23:23
272
272
|
273
273
LL | #[derive(Debug, Copy, Clone)]
274
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
274
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
275
275
|
276
276
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
277
277
--> $DIR/issue-38821.rs:9:18
@@ -287,7 +287,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
287
287
--> $DIR/issue-38821.rs:23:10
288
288
|
289
289
LL | #[derive(Debug, Copy, Clone)]
290
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
290
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
291
291
|
292
292
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
293
293
--> $DIR/issue-38821.rs:9:18
@@ -303,7 +303,7 @@ error[E0277]: the trait bound `<Col as Expression>::SqlType: NotNull` is not sat
303
303
--> $DIR/issue-38821.rs:23:23
304
304
|
305
305
LL | #[derive(Debug, Copy, Clone)]
306
-
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`, which is required by `<Col as Expression>::SqlType: IntoNullable`
306
+
| ^^^^^ the trait `NotNull` is not implemented for `<Col as Expression>::SqlType`
307
307
|
308
308
note: required for `<Col as Expression>::SqlType` to implement `IntoNullable`
0 commit comments