1
Fork 0

Move verbose_file_reads to restriction

This commit is contained in:
flip1995 2020-03-26 15:01:03 +01:00
parent 2ff568d746
commit 7a40b5c132
No known key found for this signature in database
GPG key ID: 2CEFCDB27ED0BE79
3 changed files with 3 additions and 4 deletions

View file

@ -1062,6 +1062,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&shadow::SHADOW_REUSE),
LintId::of(&shadow::SHADOW_SAME),
LintId::of(&strings::STRING_ADD),
LintId::of(&verbose_file_reads::VERBOSE_FILE_READS),
LintId::of(&write::PRINT_STDOUT),
LintId::of(&write::USE_DEBUG),
]);
@ -1380,7 +1381,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&unwrap::PANICKING_UNWRAP),
LintId::of(&unwrap::UNNECESSARY_UNWRAP),
LintId::of(&vec::USELESS_VEC),
LintId::of(&verbose_file_reads::VERBOSE_FILE_READS),
LintId::of(&write::PRINTLN_EMPTY_STRING),
LintId::of(&write::PRINT_LITERAL),
LintId::of(&write::PRINT_WITH_NEWLINE),
@ -1563,7 +1563,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(&types::UNNECESSARY_CAST),
LintId::of(&types::VEC_BOX),
LintId::of(&unwrap::UNNECESSARY_UNWRAP),
LintId::of(&verbose_file_reads::VERBOSE_FILE_READS),
LintId::of(&zero_div_zero::ZERO_DIVIDED_BY_ZERO),
]);

View file

@ -26,7 +26,7 @@ declare_clippy_lint! {
/// let mut bytes = fs::read("foo.txt").unwrap();
/// ```
pub VERBOSE_FILE_READS,
complexity,
restriction,
"use of `File::read_to_end` or `File::read_to_string`"
}

View file

@ -2410,7 +2410,7 @@ pub const ALL_LINTS: [Lint; 362] = [
},
Lint {
name: "verbose_file_reads",
group: "complexity",
group: "restriction",
desc: "use of `File::read_to_end` or `File::read_to_string`",
deprecation: None,
module: "verbose_file_reads",