Skip to content

Commit

Permalink
Fix fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Jun 23, 2020
1 parent ed083cc commit b886c06
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@ struct MutatePairDelegate<'a, 'tcx> {
span_high: Option<Span>,
}

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

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

impl<'a, 'tcx> MutatePairDelegate<'a, 'tcx> {
impl MutatePairDelegate<'_, '_> {
fn mutation_span(&self) -> (Option<Span>, Option<Span>) {
(self.span_low, self.span_high)
}
Expand Down Expand Up @@ -2292,7 +2292,7 @@ struct HasBreakOrReturnVisitor {
has_break_or_return: bool,
}

impl<'a, 'tcx> Visitor<'tcx> for HasBreakOrReturnVisitor {
impl<'tcx> Visitor<'tcx> for HasBreakOrReturnVisitor {
type Map = Map<'tcx>;

fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/suspicious_trait_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ struct BinaryExprVisitor {
in_binary_expr: bool,
}

impl<'a, 'tcx> Visitor<'tcx> for BinaryExprVisitor {
impl<'tcx> Visitor<'tcx> for BinaryExprVisitor {
type Map = Map<'tcx>;

fn visit_expr(&mut self, expr: &'tcx hir::Expr<'_>) {
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/trivially_copy_pass_by_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub struct TriviallyCopyPassByRef {
limit: u64,
}

impl<'a, 'tcx> TriviallyCopyPassByRef {
impl<'tcx> TriviallyCopyPassByRef {
pub fn new(limit: Option<u64>, target: &SessionConfig) -> Self {
let limit = limit.unwrap_or_else(|| {
let bit_width = u64::from(target.ptr_width);
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/utils/sugg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ fn indentation<T: LintContext>(cx: &T, span: Span) -> Option<String> {
}

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

impl<'a, 'b, 'c, T: LintContext> DiagnosticBuilderExt<'c, T> for rustc_errors::DiagnosticBuilder<'b> {
impl<T: LintContext> DiagnosticBuilderExt<T> for rustc_errors::DiagnosticBuilder<'_> {
fn suggest_item_with_attr<D: Display + ?Sized>(
&mut self,
cx: &T,
Expand Down
6 changes: 4 additions & 2 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// FIXME: switch to something more ergonomic here, once available.
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
#[allow(unused_extern_crates)]
extern crate rustc_data_structures;
#[allow(unused_extern_crates)]
extern crate rustc_driver;
#[allow(unused_extern_crates)]
extern crate rustc_errors;
Expand Down Expand Up @@ -97,7 +99,7 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
#[allow(clippy::find_map, clippy::filter_map)]
fn describe_lints() {
use lintlist::{Level, Lint, ALL_LINTS, LINT_LEVELS};
use std::collections::HashSet;
use rustc_data_structures::fx::FxHashSet;

println!(
"
Expand Down Expand Up @@ -141,7 +143,7 @@ Available lint options:

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

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

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

0 comments on commit b886c06

Please sign in to comment.