about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorGiang Dao <dtrnggiang@gmail.com>2024-09-13 23:07:08 +0800
committerGiang Dao <dtrnggiang@gmail.com>2024-09-14 09:25:06 +0800
commitb0db3a7bedc03d054834b675c417b988d7dc676f (patch)
tree668140d9ca64bc3590185de8428860c7695f642a /compiler/rustc_trait_selection/src
parent842d6fc32e3d0d26bb11fbe6a2f6ae2afccc06cb (diff)
downloadrust-b0db3a7bedc03d054834b675c417b988d7dc676f.tar.gz
rust-b0db3a7bedc03d054834b675c417b988d7dc676f.zip
(fix) conflicting negative impl marker and add tests
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs
index 9aa6d1f3d46..752ef729113 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/traits/mod.rs
@@ -344,7 +344,8 @@ pub(crate) fn to_pretty_impl_header(tcx: TyCtxt<'_>, impl_def_id: DefId) -> Opti
 
     write!(
         w,
-        " {} for {}",
+        " {}{} for {}",
+        tcx.impl_polarity(impl_def_id).as_str(),
         trait_ref.print_only_trait_path(),
         tcx.type_of(impl_def_id).instantiate_identity()
     )