Skip to content

Commit b886c06

Browse files
committed
Fix fallout
1 parent ed083cc commit b886c06

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

clippy_lints/src/loops.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ struct MutatePairDelegate<'a, 'tcx> {
14971497
span_high: Option<Span>,
14981498
}
14991499

1500-
impl<'a, 'tcx> Delegate<'tcx> for MutatePairDelegate<'a, 'tcx> {
1500+
impl<'tcx> Delegate<'tcx> for MutatePairDelegate<'_, 'tcx> {
15011501
fn consume(&mut self, _: &PlaceWithHirId<'tcx>, _: ConsumeMode) {}
15021502

15031503
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, bk: ty::BorrowKind) {
@@ -1525,7 +1525,7 @@ impl<'a, 'tcx> Delegate<'tcx> for MutatePairDelegate<'a, 'tcx> {
15251525
}
15261526
}
15271527

1528-
impl<'a, 'tcx> MutatePairDelegate<'a, 'tcx> {
1528+
impl MutatePairDelegate<'_, '_> {
15291529
fn mutation_span(&self) -> (Option<Span>, Option<Span>) {
15301530
(self.span_low, self.span_high)
15311531
}
@@ -2292,7 +2292,7 @@ struct HasBreakOrReturnVisitor {
22922292
has_break_or_return: bool,
22932293
}
22942294

2295-
impl<'a, 'tcx> Visitor<'tcx> for HasBreakOrReturnVisitor {
2295+
impl<'tcx> Visitor<'tcx> for HasBreakOrReturnVisitor {
22962296
type Map = Map<'tcx>;
22972297

22982298
fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {

clippy_lints/src/suspicious_trait_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ struct BinaryExprVisitor {
184184
in_binary_expr: bool,
185185
}
186186

187-
impl<'a, 'tcx> Visitor<'tcx> for BinaryExprVisitor {
187+
impl<'tcx> Visitor<'tcx> for BinaryExprVisitor {
188188
type Map = Map<'tcx>;
189189

190190
fn visit_expr(&mut self, expr: &'tcx hir::Expr<'_>) {

clippy_lints/src/trivially_copy_pass_by_ref.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub struct TriviallyCopyPassByRef {
5858
limit: u64,
5959
}
6060

61-
impl<'a, 'tcx> TriviallyCopyPassByRef {
61+
impl<'tcx> TriviallyCopyPassByRef {
6262
pub fn new(limit: Option<u64>, target: &SessionConfig) -> Self {
6363
let limit = limit.unwrap_or_else(|| {
6464
let bit_width = u64::from(target.ptr_width);

clippy_lints/src/utils/sugg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ fn indentation<T: LintContext>(cx: &T, span: Span) -> Option<String> {
509509
}
510510

511511
/// Convenience extension trait for `DiagnosticBuilder`.
512-
pub trait DiagnosticBuilderExt<'a, T: LintContext> {
512+
pub trait DiagnosticBuilderExt<T: LintContext> {
513513
/// Suggests to add an attribute to an item.
514514
///
515515
/// Correctly handles indentation of the attribute and item.
@@ -556,7 +556,7 @@ pub trait DiagnosticBuilderExt<'a, T: LintContext> {
556556
fn suggest_remove_item(&mut self, cx: &T, item: Span, msg: &str, applicability: Applicability);
557557
}
558558

559-
impl<'a, 'b, 'c, T: LintContext> DiagnosticBuilderExt<'c, T> for rustc_errors::DiagnosticBuilder<'b> {
559+
impl<T: LintContext> DiagnosticBuilderExt<T> for rustc_errors::DiagnosticBuilder<'_> {
560560
fn suggest_item_with_attr<D: Display + ?Sized>(
561561
&mut self,
562562
cx: &T,

src/driver.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// FIXME: switch to something more ergonomic here, once available.
99
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
1010
#[allow(unused_extern_crates)]
11+
extern crate rustc_data_structures;
12+
#[allow(unused_extern_crates)]
1113
extern crate rustc_driver;
1214
#[allow(unused_extern_crates)]
1315
extern crate rustc_errors;
@@ -97,7 +99,7 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
9799
#[allow(clippy::find_map, clippy::filter_map)]
98100
fn describe_lints() {
99101
use lintlist::{Level, Lint, ALL_LINTS, LINT_LEVELS};
100-
use std::collections::HashSet;
102+
use rustc_data_structures::fx::FxHashSet;
101103

102104
println!(
103105
"
@@ -141,7 +143,7 @@ Available lint options:
141143

142144
let scoped = |x: &str| format!("clippy::{}", x);
143145

144-
let lint_groups: HashSet<_> = lints.iter().map(|lint| lint.group).collect();
146+
let lint_groups: FxHashSet<_> = lints.iter().map(|lint| lint.group).collect();
145147

146148
println!("Lint checks provided by clippy:\n");
147149
println!(" {} {:7.7} meaning", padded("name"), "default");

0 commit comments

Comments
 (0)