Inside eager ty aliases on unresolved assoc tys suggest fully qualifying instead of restricting their self ty

This commit is contained in:
León Orell Valerian Liehr
2024-06-14 12:38:21 +02:00
parent 898448ca58
commit 3c8b108512
8 changed files with 138 additions and 24 deletions

View File

@@ -126,6 +126,22 @@ pub enum AssocItemNotFoundSugg<'a> {
assoc_kind: &'static str,
suggested_name: Symbol,
},
#[multipart_suggestion(
hir_analysis_assoc_item_not_found_similar_in_other_trait_qpath_sugg,
style = "verbose",
applicability = "maybe-incorrect"
)]
SimilarInOtherTraitQPath {
#[suggestion_part(code = "<")]
lo: Span,
#[suggestion_part(code = " as {trait_}>")]
mi: Span,
#[suggestion_part(code = "{suggested_name}")]
hi: Option<Span>,
trait_: &'a str,
suggested_name: Symbol,
identically_named: bool,
},
#[suggestion(
hir_analysis_assoc_item_not_found_other_sugg,
code = "{suggested_name}",