Skip to content

Commit 3c97aae

Browse files
committed
Update codebase
1 parent f70417b commit 3c97aae

11 files changed

+14
-16
lines changed

clippy_lints/src/assign_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
137137
},
138138
hir::ExprKind::Assign(ref assignee, ref e) => {
139139
if let hir::ExprKind::Binary(op, ref l, ref r) = e.node {
140-
#[allow(cyclomatic_complexity)]
140+
#[allow(clippy::cyclomatic_complexity)]
141141
let lint = |assignee: &hir::Expr, rhs: &hir::Expr| {
142142
let ty = cx.tables.expr_ty(assignee);
143143
let rty = cx.tables.expr_ty(rhs);

clippy_lints/src/consts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#![allow(cast_possible_truncation)]
2-
#![allow(float_cmp)]
1+
#![allow(clippy::float_cmp)]
32

43
use rustc::lint::LateContext;
54
use rustc::{span_bug, bug};

clippy_lints/src/cyclomatic_complexity.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CCHelper<'a, 'tcx> {
186186
}
187187

188188
#[cfg(feature = "debugging")]
189-
#[allow(too_many_arguments)]
189+
#[allow(clippy::too_many_arguments)]
190190
fn report_cc_bug(_: &LateContext<'_, '_>, cc: u64, narms: u64, div: u64, shorts: u64, returns: u64, span: Span, _: NodeId) {
191191
span_bug!(
192192
span,
@@ -200,7 +200,7 @@ fn report_cc_bug(_: &LateContext<'_, '_>, cc: u64, narms: u64, div: u64, shorts:
200200
);
201201
}
202202
#[cfg(not(feature = "debugging"))]
203-
#[allow(too_many_arguments)]
203+
#[allow(clippy::too_many_arguments)]
204204
fn report_cc_bug(cx: &LateContext<'_, '_>, cc: u64, narms: u64, div: u64, shorts: u64, returns: u64, span: Span, id: NodeId) {
205205
if !is_allowed(cx, CYCLOMATIC_COMPLEXITY, id) {
206206
cx.sess().span_note_without_error(

clippy_lints/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#![feature(iterator_find_map)]
1313
#![feature(macro_at_most_once_rep)]
1414
#![feature(rust_2018_preview)]
15+
#![feature(tool_lints)]
1516
#![warn(rust_2018_idioms)]
1617

1718
use toml;

clippy_lints/src/methods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ impl LintPass for Pass {
714714
}
715715

716716
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
717-
#[allow(cyclomatic_complexity)]
717+
#[allow(clippy::cyclomatic_complexity)]
718718
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
719719
if in_macro(expr.span) {
720720
return;
@@ -922,7 +922,7 @@ fn lint_or_fun_call(cx: &LateContext<'_, '_>, expr: &hir::Expr, method_span: Spa
922922
}
923923

924924
/// Check for `*or(foo())`.
925-
#[allow(too_many_arguments)]
925+
#[allow(clippy::too_many_arguments)]
926926
fn check_general_case(
927927
cx: &LateContext<'_, '_>,
928928
name: &str,

clippy_lints/src/utils/comparisons.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Utility functions about comparison operators.
22
3-
#![deny(missing_docs_in_private_items)]
3+
#![deny(clippy::missing_docs_in_private_items)]
44

55
use rustc::hir::{BinOpKind, Expr};
66

clippy_lints/src/utils/conf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Read configurations files.
22
3-
#![deny(missing_docs_in_private_items)]
3+
#![deny(clippy::missing_docs_in_private_items)]
44

55
use lazy_static::lazy_static;
66
use std::{env, fmt, fs, io, path};

clippy_lints/src/utils/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This module contains some useful constants.
22
3-
#![deny(missing_docs_in_private_items)]
3+
#![deny(clippy::missing_docs_in_private_items)]
44

55
/// List of the built-in types names.
66
///

clippy_lints/src/utils/higher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! This module contains functions for retrieve the original AST from lowered
22
//! `hir`.
33
4-
#![deny(missing_docs_in_private_items)]
4+
#![deny(clippy::missing_docs_in_private_items)]
55

66
use if_chain::if_chain;
77
use rustc::{hir, ty};

clippy_lints/src/utils/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
364364
}.hash(&mut self.s);
365365
}
366366

367-
#[allow(many_single_char_names)]
367+
#[allow(clippy::many_single_char_names)]
368368
pub fn hash_expr(&mut self, e: &Expr) {
369369
if let Some(e) = constant_simple(self.cx, self.tables, e) {
370370
return e.hash(&mut self.s);

clippy_lints/src/utils/sugg.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Contains utility functions to generate suggestions.
2-
#![deny(missing_docs_in_private_items)]
3-
// currently ignores lifetimes and generics
4-
#![allow(use_self)]
2+
#![deny(clippy::missing_docs_in_private_items)]
53

64
use matches::matches;
75
use rustc::hir;
@@ -40,7 +38,7 @@ impl Display for Sugg<'_> {
4038
}
4139
}
4240

43-
#[allow(wrong_self_convention)] // ok, because of the function `as_ty` method
41+
#[allow(clippy::wrong_self_convention)] // ok, because of the function `as_ty` method
4442
impl<'a> Sugg<'a> {
4543
/// Prepare a suggestion from an expression.
4644
pub fn hir_opt(cx: &LateContext<'_, '_>, expr: &hir::Expr) -> Option<Self> {

0 commit comments

Comments
 (0)