Tweak trait modifier errors

This commit is contained in:
Cameron Steffen
2025-07-30 18:00:53 -05:00
parent fa733909ed
commit 3aa0ac0a8a
15 changed files with 50 additions and 55 deletions

View File

@@ -73,16 +73,16 @@ pub(crate) struct BadQPathStage2 {
#[derive(Diagnostic)]
#[diag(parse_trait_impl_modifier_in_inherent_impl)]
pub(crate) struct TraitImplModifierInInherentImpl<'a> {
#[note]
pub(crate) struct TraitImplModifierInInherentImpl {
#[primary_span]
pub span: Span,
pub modifier: &'static str,
pub modifier_name: &'static str,
#[label(parse_because)]
pub annotation_span: Span,
pub annotation: &'a str,
pub modifier_span: Span,
#[label(parse_type)]
pub self_ty: Span,
#[note(parse_only_trait)]
pub only_trait: bool,
}
#[derive(Subdiagnostic)]