diff options
| author | Alex Macleod <alex@macleod.io> | 2024-03-18 21:28:43 +0000 |
|---|---|---|
| committer | Alex Macleod <alex@macleod.io> | 2024-03-22 15:58:29 +0000 |
| commit | a24d12b7aa0d5e4d94b5d4f8467d21986d906de3 (patch) | |
| tree | 35f285feae0ca5cae852ff00870a844112c9ae24 /clippy_dev | |
| parent | f2020c884f1a47fec9a2fa26c5ca0ec58b5e1271 (diff) | |
| download | rust-a24d12b7aa0d5e4d94b5d4f8467d21986d906de3.tar.gz rust-a24d12b7aa0d5e4d94b5d4f8467d21986d906de3.zip | |
Enable unused_qualifications lint
Diffstat (limited to 'clippy_dev')
| -rw-r--r-- | clippy_dev/src/lib.rs | 9 | ||||
| -rw-r--r-- | clippy_dev/src/update_lints.rs | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs index c4ae4f0e2bd..bb62e902cd5 100644 --- a/clippy_dev/src/lib.rs +++ b/clippy_dev/src/lib.rs @@ -2,8 +2,13 @@ #![feature(let_chains)] #![feature(rustc_private)] #![cfg_attr(feature = "deny-warnings", deny(warnings))] -// warn on lints, that are included in `rust-lang/rust`s bootstrap -#![warn(rust_2018_idioms, unused_lifetimes)] +#![warn( + trivial_casts, + trivial_numeric_casts, + rust_2018_idioms, + unused_lifetimes, + unused_qualifications +)] // The `rustc_driver` crate seems to be required in order to use the `rust_lexer` crate. #[allow(unused_extern_crates)] diff --git a/clippy_dev/src/update_lints.rs b/clippy_dev/src/update_lints.rs index 76ae26dddf4..625b1339591 100644 --- a/clippy_dev/src/update_lints.rs +++ b/clippy_dev/src/update_lints.rs @@ -992,7 +992,7 @@ fn replace_region_in_text<'a>( } fn try_rename_file(old_name: &Path, new_name: &Path) -> bool { - match fs::OpenOptions::new().create_new(true).write(true).open(new_name) { + match OpenOptions::new().create_new(true).write(true).open(new_name) { Ok(file) => drop(file), Err(e) if matches!(e.kind(), io::ErrorKind::AlreadyExists | io::ErrorKind::NotFound) => return false, Err(e) => panic_file(e, new_name, "create"), @@ -1016,7 +1016,7 @@ fn panic_file(error: io::Error, name: &Path, action: &str) -> ! { } fn rewrite_file(path: &Path, f: impl FnOnce(&str) -> Option<String>) { - let mut file = fs::OpenOptions::new() + let mut file = OpenOptions::new() .write(true) .read(true) .open(path) |
