Arbitrary self types v2: adjust diagnostic.

The recently landed PR to adjust arbitrary self types was a bit
overenthusiastic, advising folks to use the new Receiver trait even
before it's been stabilized. Revert to the older wording of the lint in
such cases.
This commit is contained in:
Adrian Taylor 2024-12-13 15:40:37 +00:00
parent dd436ae2a6
commit 174dae607c
12 changed files with 45 additions and 23 deletions

View file

@ -1655,6 +1655,16 @@ pub(crate) struct NonConstRange {
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_invalid_receiver_ty_no_arbitrary_self_types, code = E0307)]
#[note]
#[help(hir_analysis_invalid_receiver_ty_help_no_arbitrary_self_types)]
pub(crate) struct InvalidReceiverTyNoArbitrarySelfTypes<'tcx> {
#[primary_span]
pub span: Span,
pub receiver_ty: Ty<'tcx>,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_invalid_receiver_ty, code = E0307)]
#[note]