diff options
| author | Michael Goulet <michael@errs.io> | 2024-08-11 12:10:36 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-08-11 12:25:39 -0400 |
| commit | c361c924a08c2e34c705ec3ee1ad2099315338d8 (patch) | |
| tree | baf77b91e85e7f6ef791733caa6ca797b4093b39 /compiler/rustc_parse/src/parser/tests.rs | |
| parent | 68d2e8a66e0003178baf7dd9bbc62dc76f54a1af (diff) | |
| download | rust-c361c924a08c2e34c705ec3ee1ad2099315338d8.tar.gz rust-c361c924a08c2e34c705ec3ee1ad2099315338d8.zip | |
Use assert_matches around the compiler
Diffstat (limited to 'compiler/rustc_parse/src/parser/tests.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/tests.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/tests.rs b/compiler/rustc_parse/src/parser/tests.rs index 2d82742f66c..cb8e8d30988 100644 --- a/compiler/rustc_parse/src/parser/tests.rs +++ b/compiler/rustc_parse/src/parser/tests.rs @@ -1,3 +1,4 @@ +use std::assert_matches::assert_matches; use std::io::prelude::*; use std::iter::Peekable; use std::path::{Path, PathBuf}; @@ -1747,7 +1748,7 @@ fn out_of_line_mod() { .unwrap(); let ast::ItemKind::Mod(_, mod_kind) = &item.kind else { panic!() }; - assert!(matches!(mod_kind, ast::ModKind::Loaded(items, ..) if items.len() == 2)); + assert_matches!(mod_kind, ast::ModKind::Loaded(items, ..) if items.len() == 2); }); } |
