Skip to content

Commit c3ab9c5

Browse files
committed
Enable significant_drop_tightening
1 parent e0ff587 commit c3ab9c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clippy_utils/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ use core::mem;
8585
use core::ops::ControlFlow;
8686
use std::collections::hash_map::Entry;
8787
use std::iter::{once, repeat_n, zip};
88-
use std::sync::{Mutex, MutexGuard, OnceLock};
88+
use std::sync::{Mutex, OnceLock};
8989

9090
use itertools::Itertools;
9191
use rustc_abi::Integer;
@@ -2421,9 +2421,7 @@ static TEST_ITEM_NAMES_CACHE: OnceLock<Mutex<FxHashMap<LocalModDefId, Vec<Symbol
24212421
/// The names are sorted using the default `Symbol` ordering.
24222422
fn with_test_item_names(tcx: TyCtxt<'_>, module: LocalModDefId, f: impl FnOnce(&[Symbol]) -> bool) -> bool {
24232423
let cache = TEST_ITEM_NAMES_CACHE.get_or_init(|| Mutex::new(FxHashMap::default()));
2424-
let mut map: MutexGuard<'_, FxHashMap<LocalModDefId, Vec<Symbol>>> = cache.lock().unwrap();
2425-
let value = map.entry(module);
2426-
match value {
2424+
match cache.lock().unwrap().entry(module) {
24272425
Entry::Occupied(entry) => f(entry.get()),
24282426
Entry::Vacant(entry) => {
24292427
let mut names = Vec::new();

tests/dogfood.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ fn run_clippy_for_package(project: &str) -> bool {
9393
"clippy::dbg_macro",
9494
"-D",
9595
"clippy::needless_pass_by_ref_mut",
96+
"-D",
97+
"clippy::significant_drop_tightening",
9698
]);
9799
if !cfg!(feature = "internal") {
98100
// running a clippy built without internal lints on the clippy source

0 commit comments

Comments
 (0)