about summary refs log tree commit diff
path: root/compiler/rustc_span/src/lib.rs
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-03-04 13:06:01 +0100
committerMara Bos <m-ou.se@m-ou.se>2021-03-18 14:25:54 +0100
commitcfb4ad4f2abf42ff603d5f9e89f1352cb79a451c (patch)
tree19cfc48983d2549969452202de101fd8e3846233 /compiler/rustc_span/src/lib.rs
parent895a8e71b1a9fc42631f81b071bc855f7fb3e9a4 (diff)
downloadrust-cfb4ad4f2abf42ff603d5f9e89f1352cb79a451c.tar.gz
rust-cfb4ad4f2abf42ff603d5f9e89f1352cb79a451c.zip
Remove unwrap_none/expect_none from compiler/.
Diffstat (limited to 'compiler/rustc_span/src/lib.rs')
-rw-r--r--compiler/rustc_span/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 6030c8a86d9..d2790335b5a 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -21,7 +21,6 @@
 #![feature(negative_impls)]
 #![feature(nll)]
 #![feature(min_specialization)]
-#![feature(option_expect_none)]
 
 #[macro_use]
 extern crate rustc_macros;
@@ -1996,7 +1995,8 @@ impl<CTX: HashStableContext> HashStable<CTX> for ExpnId {
                 if cache.len() < new_len {
                     cache.resize(new_len, None);
                 }
-                cache[index].replace(sub_hash).expect_none("Cache slot was filled");
+                let prev = cache[index].replace(sub_hash);
+                assert_eq!(prev, None, "Cache slot was filled");
             });
             sub_hash.hash_stable(ctx, hasher);
         }