diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-03-04 13:06:01 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2021-03-18 14:25:54 +0100 |
| commit | cfb4ad4f2abf42ff603d5f9e89f1352cb79a451c (patch) | |
| tree | 19cfc48983d2549969452202de101fd8e3846233 /compiler/rustc_middle/src/ich/impls_syntax.rs | |
| parent | 895a8e71b1a9fc42631f81b071bc855f7fb3e9a4 (diff) | |
| download | rust-cfb4ad4f2abf42ff603d5f9e89f1352cb79a451c.tar.gz rust-cfb4ad4f2abf42ff603d5f9e89f1352cb79a451c.zip | |
Remove unwrap_none/expect_none from compiler/.
Diffstat (limited to 'compiler/rustc_middle/src/ich/impls_syntax.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ich/impls_syntax.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ich/impls_syntax.rs b/compiler/rustc_middle/src/ich/impls_syntax.rs index bfbe15749ee..31374429940 100644 --- a/compiler/rustc_middle/src/ich/impls_syntax.rs +++ b/compiler/rustc_middle/src/ich/impls_syntax.rs @@ -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!(); } |
