diff --git a/compiler/rustc_type_ir/src/predicate.rs b/compiler/rustc_type_ir/src/predicate.rs index 82a7bf314a949..e4bf1e1379c95 100644 --- a/compiler/rustc_type_ir/src/predicate.rs +++ b/compiler/rustc_type_ir/src/predicate.rs @@ -197,8 +197,7 @@ impl fmt::Display for ImplPolarity { } impl ImplPolarity { - /// Typically used to decorate the impl trait message by adding the corresponding - /// polarity marker before the trait name. + /// The polarity marker in front of the impl trait ref if applicable. pub fn as_str(self) -> &'static str { match self { Self::Positive => "", diff --git a/tests/ui/coherence/coherence-conflicting-repeated-negative-trait-impl-70849.rs b/tests/ui/coherence/coherence-conflicting-repeated-negative-trait-impl-70849.rs index d0ef2560c5ab4..88b9d9e62bf75 100644 --- a/tests/ui/coherence/coherence-conflicting-repeated-negative-trait-impl-70849.rs +++ b/tests/ui/coherence/coherence-conflicting-repeated-negative-trait-impl-70849.rs @@ -1,7 +1,7 @@ #![feature(negative_impls)] //@ edition: 2021 -// Test to ensure we are printing the polarity of the trait when printing out -// conflicting trait impls +// Test to ensure we are printing the polarity of the impl trait ref +// when printing out conflicting trait impls struct MyType;