Remove unwrap_none/expect_none from compiler/.

This commit is contained in:
Mara Bos
2021-03-04 13:06:01 +01:00
parent 895a8e71b1
commit cfb4ad4f2a
10 changed files with 38 additions and 23 deletions

View File

@@ -45,7 +45,11 @@ impl<'ctx> rustc_ast::HashStableContext for StableHashingContext<'ctx> {
item.hash_stable(self, hasher);
style.hash_stable(self, hasher);
span.hash_stable(self, hasher);
tokens.as_ref().expect_none("Tokens should have been removed during lowering!");
assert_matches!(
tokens.as_ref(),
None,
"Tokens should have been removed during lowering!"
);
} else {
unreachable!();
}