Suggest full trait ref (with placeholders) on unresolved assoc tys

This commit is contained in:
León Orell Valerian Liehr
2024-06-15 11:08:12 +02:00
parent 3c8b108512
commit 02a2f02727
5 changed files with 57 additions and 23 deletions

View File

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