From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_hir_analysis/src/errors.rs | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'compiler/rustc_hir_analysis/src/errors.rs') diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index c92ab749b..04f5f3f62 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -51,6 +51,17 @@ pub struct LifetimesOrBoundsMismatchOnTrait { pub ident: Ident, } +#[derive(Diagnostic)] +#[diag(hir_analysis_async_trait_impl_should_be_async)] +pub struct AsyncTraitImplShouldBeAsync { + #[primary_span] + // #[label] + pub span: Span, + #[label(trait_item_label)] + pub trait_item_span: Option, + pub method_name: Symbol, +} + #[derive(Diagnostic)] #[diag(hir_analysis_drop_impl_on_wrong_item, code = "E0120")] pub struct DropImplOnWrongItem { @@ -253,13 +264,6 @@ pub struct ExternCrateNotIdiomatic { pub suggestion_code: String, } -#[derive(Diagnostic)] -#[diag(hir_analysis_expected_used_symbol)] -pub struct ExpectedUsedSymbol { - #[primary_span] - pub span: Span, -} - #[derive(Diagnostic)] #[diag(hir_analysis_const_impl_for_non_const_trait)] pub struct ConstImplForNonConstTrait { @@ -296,3 +300,15 @@ pub(crate) struct LinkageType { #[primary_span] pub span: Span, } + +#[derive(Diagnostic)] +#[help] +#[diag(hir_analysis_auto_deref_reached_recursion_limit, code = "E0055")] +pub struct AutoDerefReachedRecursionLimit<'a> { + #[primary_span] + #[label] + pub span: Span, + pub ty: Ty<'a>, + pub suggested_limit: rustc_session::Limit, + pub crate_name: Symbol, +} -- cgit v1.2.3