Rollup merge of #108930 - Ezrashaw:better-error-for-manual-fn-impl, r=petrochenkov
feat: implement better error for manual impl of `Fn*` traits Fixes #39259 cc `@estebank` (you gave me some advice in the linked issue, would you like to review?)
This commit is contained in:
commit
76994625f8
10 changed files with 142 additions and 51 deletions
|
@ -129,6 +129,18 @@ pub struct AssocTypeBindingNotAllowed {
|
|||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
|
||||
#[subdiagnostic]
|
||||
pub fn_trait_expansion: Option<ParenthesizedFnTraitExpansion>,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[help(hir_analysis_parenthesized_fn_trait_expansion)]
|
||||
pub struct ParenthesizedFnTraitExpansion {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
|
||||
pub expanded_type: String,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue