diff --git a/compiler/rustc_typeck/src/coherence/inherent_impls.rs b/compiler/rustc_typeck/src/coherence/inherent_impls.rs index 05d7dfb9c8ffae49b68bd39849ba7a474d81bec1..c7be9e2123512cae236c673adf01cec411436b32 100644 --- a/compiler/rustc_typeck/src/coherence/inherent_impls.rs +++ b/compiler/rustc_typeck/src/coherence/inherent_impls.rs @@ -67,7 +67,7 @@ fn visit_item(&mut self, item: &hir::Item<'_>) { E0785, "cannot define inherent `impl` for a dyn auto trait" ) - .span_label(ty.span, "impl requires a principal trait") + .span_label(ty.span, "impl requires at least one non-auto trait") .note("define and implement a new trait or type instead") .emit(); } diff --git a/src/test/ui/coherence/issue-85026.stderr b/src/test/ui/coherence/issue-85026.stderr index cf9cd52d2bfdd8b42111ba3f2951e7ac0504f2eb..a5da19bbfaa4764b721baacda810cf3cf146bc27 100644 --- a/src/test/ui/coherence/issue-85026.stderr +++ b/src/test/ui/coherence/issue-85026.stderr @@ -2,7 +2,7 @@ error[E0785]: cannot define inherent `impl` for a dyn auto trait --> $DIR/issue-85026.rs:5:6 | LL | impl dyn AutoTrait {} - | ^^^^^^^^^^^^^ impl requires a principal trait + | ^^^^^^^^^^^^^ impl requires at least one non-auto trait | = note: define and implement a new trait or type instead @@ -10,7 +10,7 @@ error[E0785]: cannot define inherent `impl` for a dyn auto trait --> $DIR/issue-85026.rs:8:6 | LL | impl dyn Unpin {} - | ^^^^^^^^^ impl requires a principal trait + | ^^^^^^^^^ impl requires at least one non-auto trait | = note: define and implement a new trait or type instead