Skip to content

Commit 5817b6f

Browse files
committed
don't lint use self::
1 parent 6e0623f commit 5817b6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clippy_lints/src/use_crate_prefix_for_self_imports.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ impl LateLintPass<'_> for UseCratePrefixForSelfImports {
7171
&& def_id.krate == LOCAL_CRATE
7272
{
7373
let root = segment.ident.name;
74-
if root != rustc_span::symbol::kw::Crate && root != rustc_span::symbol::kw::Super {
74+
if root != rustc_span::symbol::kw::Crate
75+
&& root != rustc_span::symbol::kw::Super
76+
&& root != rustc_span::symbol::kw::SelfLower
77+
{
7578
span_lint_and_sugg(
7679
cx,
7780
USE_CRATE_PREFIX_FOR_SELF_IMPORTS,

0 commit comments

Comments
 (0)