Skip to content

Commit e0bce71

Browse files
committed
refactor
1 parent 6e5c64e commit e0bce71

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_hir_typeck/src/method/suggest.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ use rustc_hir::{self as hir, ExprKind, HirId, Node, PathSegment, QPath};
2323
use rustc_infer::infer::{self, RegionVariableOrigin};
2424
use rustc_middle::bug;
2525
use rustc_middle::ty::fast_reject::{DeepRejectCtxt, TreatParams, simplify_type};
26-
#[allow(unused_imports)]
2726
use rustc_middle::ty::print::{
28-
PrintTraitRefExt as _, with_crate_prefix, with_forced_trimmed_paths, with_no_trimmed_paths,
29-
with_no_visible_paths, with_no_visible_paths_if_doc_hidden,
27+
PrintTraitRefExt as _, with_crate_prefix, with_forced_trimmed_paths,
28+
with_no_visible_paths_if_doc_hidden,
3029
};
3130
use rustc_middle::ty::{self, GenericArgKind, IsSuggestable, Ty, TyCtxt, TypeVisitableExt};
3231
use rustc_span::def_id::DefIdSet;

compiler/rustc_middle/src/ty/print/pretty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ define_helper!(
135135
/// Prevent selection of visible paths. `Display` impl of DefId will prefer
136136
/// visible (public) reexports of types as paths.
137137
fn with_no_visible_paths(NoVisibleGuard, NO_VISIBLE_PATH);
138+
/// Prevent selection of visible paths if the paths are through any doc hidden path.
138139
fn with_no_visible_paths_if_doc_hidden(NoVisibleIfDocHiddenGuard, NO_VISIBLE_PATH_IF_DOC_HIDDEN);
139140
);
140141

0 commit comments

Comments
 (0)