From 5c454551dae45563e7a33da7142377cf7d8dbcbf Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sun, 7 Nov 2021 10:33:27 +0100 Subject: more clippy fixes --- compiler/rustc_data_structures/src/steal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src') diff --git a/compiler/rustc_data_structures/src/steal.rs b/compiler/rustc_data_structures/src/steal.rs index a1ffbae8b15..a3ece655047 100644 --- a/compiler/rustc_data_structures/src/steal.rs +++ b/compiler/rustc_data_structures/src/steal.rs @@ -34,7 +34,7 @@ impl Steal { #[track_caller] pub fn borrow(&self) -> MappedReadGuard<'_, T> { let borrow = self.value.borrow(); - if let None = &*borrow { + if borrow.is_none() { panic!("attempted to read from stolen value: {}", std::any::type_name::()); } ReadGuard::map(borrow, |opt| opt.as_ref().unwrap()) -- cgit 1.4.1-3-g733a5