From 1398d5430c59265f8a25f7ae19297cf4b1c9b4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Tr=C6=B0=E1=BB=9Dng=20Giang?= Date: Sat, 14 Sep 2024 00:31:13 +0800 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: León Orell Valerian Liehr --- compiler/rustc_type_ir/src/predicate.rs | 3 +-- ...oherence-conflicting-repeated-negative-trait-impl-70849.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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;