From 6e70678f7d93ad777297c865e35e005520a4eefb Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 31 Aug 2021 08:52:19 -0700 Subject: [PATCH] Change wording to less jaron-y "non-auto trait" Co-authored-by: Vadim Petrochenkov --- compiler/rustc_typeck/src/coherence/inherent_impls.rs | 2 +- src/test/ui/coherence/issue-85026.stderr | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_typeck/src/coherence/inherent_impls.rs b/compiler/rustc_typeck/src/coherence/inherent_impls.rs index 05d7dfb9c8f..c7be9e21235 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 cf9cd52d2bf..a5da19bbfaa 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 -- GitLab