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> + '_ {
8686            // Check if the impl trait that we are considering is an impl of a local trait. 
8787            self . maybe_suggest_blanket_trait_impl ( self_ty,  & mut  diag) ; 
8888            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+             } 
8997            diag. stash ( self_ty. span ,  StashKey :: TraitMissingMethod ) 
9098        }  else  { 
9199            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