@@ -6,13 +6,15 @@ extern crate rustc_hir;
66extern crate rustc_span;
77
88use clippy_utils:: { diagnostics:: span_lint, is_in_test} ;
9- use dylint_internal:: home;
109use once_cell:: unsync:: OnceCell ;
1110use rustc_ast:: ast:: LitKind ;
1211use rustc_hir:: { Expr , ExprKind } ;
1312use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
1413use rustc_span:: Span ;
15- use std:: path:: { Path , PathBuf } ;
14+ use std:: {
15+ env:: home_dir,
16+ path:: { Path , PathBuf } ,
17+ } ;
1618
1719dylint_linting:: impl_late_lint! {
1820 /// ### What it does
@@ -84,7 +86,7 @@ impl<'tcx> LateLintPass<'tcx> for AbsHomePath {
8486 && path. is_absolute ( )
8587 && self
8688 . home
87- . get_or_init ( home :: home_dir)
89+ . get_or_init ( home_dir)
8890 . as_ref ( )
8991 . is_some_and ( |dir| path. starts_with ( dir) )
9092 {
@@ -114,7 +116,7 @@ fn ui() {
114116
115117 // smoelius: On GitHub, `dylint` is stored on the D drive, not in the user's home directory on
116118 // the C drive.
117- if let Some ( home) = home :: home_dir ( )
119+ if let Some ( home) = home_dir ( )
118120 && !Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) ) . starts_with ( home)
119121 {
120122 #[ expect( clippy:: explicit_write) ]
@@ -189,7 +191,7 @@ fn context_allowance() {
189191 ] ;
190192
191193 // Skip tests if repository is not stored in the user's home directory
192- if let Some ( home) = home :: home_dir ( )
194+ if let Some ( home) = home_dir ( )
193195 && !Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) ) . starts_with ( home)
194196 {
195197 #[ expect( clippy:: explicit_write) ]
0 commit comments