1
Fork 0

Rollup merge of #130311 - heiseish:issue-70849-fix, r=fmease

(fix) conflicting negative impl marker

## Context

This MR fixes the error message for conflicting negative trait impls by adding the corresponding the polarity marker to the trait name.

## Issues

- closes #70849

r​? `@fmease`
This commit is contained in:
Stuart Cook 2024-09-14 20:22:41 +10:00 committed by GitHub
commit 517e7ce37f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 1 deletions

View file

@ -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()
)