File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
compiler/rustc_hir_analysis/src/hir_ty_lowering Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,14 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
86
86
// Check if the impl trait that we are considering is an impl of a local trait.
87
87
self . maybe_suggest_blanket_trait_impl ( self_ty, & mut diag) ;
88
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
+ }
89
97
diag. stash ( self_ty. span , StashKey :: TraitMissingMethod )
90
98
} else {
91
99
tcx. node_span_lint ( BARE_TRAIT_OBJECTS , self_ty. hir_id , self_ty. span , |lint| {
You can’t perform that action at this time.
0 commit comments