Rollup merge of #128978 - compiler-errors:assert-matches, r=jieyouxu
Use `assert_matches` around the compiler more It's a useful assertion, especially since it actually prints out the LHS.
This commit is contained in:
commit
7c6dca9050
39 changed files with 100 additions and 49 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
|
@ -16,7 +18,7 @@ fn lookup_cdecl() {
|
|||
#[test]
|
||||
fn lookup_baz() {
|
||||
let abi = lookup("baz");
|
||||
assert!(matches!(abi, Err(AbiUnsupported::Unrecognized)))
|
||||
assert_matches!(abi, Err(AbiUnsupported::Unrecognized));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue