@@ -1725,7 +1725,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1725
1725
if unsatisfied_predicates. is_empty ( )
1726
1726
// ...or if we already suggested that name because of `rustc_confusable` annotation
1727
1727
&& 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.
1729
1729
&& !span. from_expansion ( )
1730
1730
{
1731
1731
self . find_likely_intended_associated_item (
@@ -3480,7 +3480,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
3480
3480
mut valid_out_of_scope_traits : Vec < DefId > ,
3481
3481
explain : bool ,
3482
3482
) -> 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 ) ) ;
3484
3484
if !valid_out_of_scope_traits. is_empty ( ) {
3485
3485
let mut candidates = valid_out_of_scope_traits;
3486
3486
candidates. sort_by_key ( |id| self . tcx . def_path_str ( id) ) ;
@@ -4385,7 +4385,7 @@ pub(crate) struct TraitInfo {
4385
4385
/// Retrieves all traits in this crate and any dependent crates,
4386
4386
/// and wraps them into `TraitInfo` for custom sorting.
4387
4387
pub ( 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 ( )
4389
4389
}
4390
4390
4391
4391
fn print_disambiguation_help < ' tcx > (
0 commit comments