diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-07 10:33:27 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-11-07 16:59:05 +0100 |
| commit | 5c454551dae45563e7a33da7142377cf7d8dbcbf (patch) | |
| tree | 125059dbd4347c80223b6fe7dfdf14abcba68bf8 /compiler/rustc_data_structures/src | |
| parent | 88b4ea8fb67ff5f754366157cbd98d9813253d93 (diff) | |
| download | rust-5c454551dae45563e7a33da7142377cf7d8dbcbf.tar.gz rust-5c454551dae45563e7a33da7142377cf7d8dbcbf.zip | |
more clippy fixes
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/steal.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<T> Steal<T> { #[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::<T>()); } ReadGuard::map(borrow, |opt| opt.as_ref().unwrap()) |
