@@ -1725,7 +1725,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
17251725 if unsatisfied_predicates. is_empty ( )
17261726 // ...or if we already suggested that name because of `rustc_confusable` annotation
17271727 && Some ( similar_candidate. name ( ) ) != confusable_suggested
1728- // and if the we aren't in an expansion.
1728+ // and if we aren't in an expansion.
17291729 && !span. from_expansion ( )
17301730 {
17311731 self . find_likely_intended_associated_item (
@@ -3480,7 +3480,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
34803480 mut valid_out_of_scope_traits : Vec < DefId > ,
34813481 explain : bool ,
34823482 ) -> bool {
3483- valid_out_of_scope_traits. retain ( |id| ! self . tcx . is_private_dep ( id. krate ) ) ;
3483+ valid_out_of_scope_traits. retain ( |id| self . tcx . is_user_visible_dep ( id. krate ) ) ;
34843484 if !valid_out_of_scope_traits. is_empty ( ) {
34853485 let mut candidates = valid_out_of_scope_traits;
34863486 candidates. sort_by_key ( |id| self . tcx . def_path_str ( id) ) ;
@@ -4385,7 +4385,7 @@ pub(crate) struct TraitInfo {
43854385/// Retrieves all traits in this crate and any dependent crates,
43864386/// and wraps them into `TraitInfo` for custom sorting.
43874387pub ( crate ) fn all_traits ( tcx : TyCtxt < ' _ > ) -> Vec < TraitInfo > {
4388- tcx. all_traits ( ) . map ( |def_id| TraitInfo { def_id } ) . collect ( )
4388+ tcx. all_traits_including_private ( ) . map ( |def_id| TraitInfo { def_id } ) . collect ( )
43894389}
43904390
43914391fn print_disambiguation_help < ' tcx > (
0 commit comments