Rollup merge of #80069 - jyn514:core-assert, r=dtolnay

Test that `core::assert!` is valid

Closes https://github.com/rust-lang/rust/issues/55482.

r? `@dtolnay`
This commit is contained in:
Yuki Okushi 2020-12-17 11:44:05 +09:00 committed by GitHub
commit 3cf5bc8b37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
// compile-flags: --crate-type=lib
// check-pass
// issue #55482
#![no_std]
macro_rules! foo {
($e:expr) => {
$crate::core::assert!($e);
$crate::core::assert_eq!($e, true);
};
}
pub fn foo() { foo!(true); }