Skip to content

Commit 7f7bfe1

Browse files
committed
inline a function that is only used in clippy
1 parent c0e6676 commit 7f7bfe1

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

compiler/rustc_hir/src/hir.rs

-4
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ impl Lifetime {
163163
(LifetimeSuggestionPosition::Normal, self.ident.span)
164164
}
165165
}
166-
167-
pub fn is_static(&self) -> bool {
168-
self.res == LifetimeName::Static
169-
}
170166
}
171167

172168
/// A `Path` is essentially Rust's notion of a name; for instance,

src/tools/clippy/clippy_lints/src/lifetimes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ fn check_fn_inner<'tcx>(
176176
_ => None,
177177
});
178178
for bound in lifetimes {
179-
if !bound.is_static() && !bound.is_elided() {
179+
if bound.res != LifetimeName::Static && !bound.is_elided() {
180180
return;
181181
}
182182
}

0 commit comments

Comments
 (0)