We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea22586 commit 4481349Copy full SHA for 4481349
compiler/rustc_hir_analysis/src/hir_ty_lowering/lint.rs
@@ -86,6 +86,14 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
86
// Check if the impl trait that we are considering is an impl of a local trait.
87
self.maybe_suggest_blanket_trait_impl(self_ty, &mut diag);
88
self.maybe_suggest_assoc_ty_bound(self_ty, &mut diag);
89
+ if let Some(mut sugg) =
90
+ self.tcx.dcx().steal_diagnostic(self_ty.span, StashKey::AssociatedTypeSuggestion)
91
+ && let Ok(ref mut s1) = err.suggestions
92
+ && let Ok(ref mut s2) = sugg.suggestions
93
+ {
94
+ s1.append(s2);
95
+ sugg.cancel();
96
+ }
97
diag.stash(self_ty.span, StashKey::TraitMissingMethod)
98
} else {
99
tcx.node_span_lint(BARE_TRAIT_OBJECTS, self_ty.hir_id, self_ty.span, |lint| {
0 commit comments