Skip to content

Commit 6e70678

Browse files
Change wording to less jaron-y "non-auto trait"
Co-authored-by: Vadim Petrochenkov <[email protected]>
1 parent 435cdd0 commit 6e70678

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_typeck/src/coherence/inherent_impls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl ItemLikeVisitor<'v> for InherentCollect<'tcx> {
6767
E0785,
6868
"cannot define inherent `impl` for a dyn auto trait"
6969
)
70-
.span_label(ty.span, "impl requires a principal trait")
70+
.span_label(ty.span, "impl requires at least one non-auto trait")
7171
.note("define and implement a new trait or type instead")
7272
.emit();
7373
}

src/test/ui/coherence/issue-85026.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ error[E0785]: cannot define inherent `impl` for a dyn auto trait
22
--> $DIR/issue-85026.rs:5:6
33
|
44
LL | impl dyn AutoTrait {}
5-
| ^^^^^^^^^^^^^ impl requires a principal trait
5+
| ^^^^^^^^^^^^^ impl requires at least one non-auto trait
66
|
77
= note: define and implement a new trait or type instead
88

99
error[E0785]: cannot define inherent `impl` for a dyn auto trait
1010
--> $DIR/issue-85026.rs:8:6
1111
|
1212
LL | impl dyn Unpin {}
13-
| ^^^^^^^^^ impl requires a principal trait
13+
| ^^^^^^^^^ impl requires at least one non-auto trait
1414
|
1515
= note: define and implement a new trait or type instead
1616

0 commit comments

Comments
 (0)