Error message for ambiguous RTN from super bounds
This commit is contained in:
parent
fef2f5b815
commit
76802e31a1
6 changed files with 84 additions and 3 deletions
|
@ -6,7 +6,7 @@ use rustc_errors::{
|
|||
MultiSpan,
|
||||
};
|
||||
use rustc_macros::{Diagnostic, Subdiagnostic};
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_middle::ty::{self, print::TraitRefPrintOnlyTraitPath, Ty};
|
||||
use rustc_span::{symbol::Ident, Span, Symbol};
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
@ -516,6 +516,18 @@ pub(crate) struct ReturnTypeNotationMissingMethod {
|
|||
pub assoc_name: Symbol,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_return_type_notation_conflicting_bound)]
|
||||
#[note]
|
||||
pub(crate) struct ReturnTypeNotationConflictingBound<'tcx> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub ty_name: String,
|
||||
pub assoc_name: Symbol,
|
||||
pub first_bound: ty::Binder<'tcx, TraitRefPrintOnlyTraitPath<'tcx>>,
|
||||
pub second_bound: ty::Binder<'tcx, TraitRefPrintOnlyTraitPath<'tcx>>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_placeholder_not_allowed_item_signatures, code = "E0121")]
|
||||
pub(crate) struct PlaceholderNotAllowedItemSignatures {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue