Implement dummy assert macro

This commit is contained in:
Edwin Cheng 2020-03-11 23:08:12 +08:00
parent bddf6b5266
commit 759bcea96d
4 changed files with 60 additions and 6 deletions

View file

@ -838,14 +838,10 @@ fn func(foo: i32) { if true { <|>foo; }; }
r#"
//- /lib.rs
#[rustc_builtin_macro]
macro_rules! assert {
($cond:expr) => {{ /* compiler built-in */ }};
($cond:expr,) => {{ /* compiler built-in */ }};
($cond:expr, $($arg:tt)+) => {{ /* compiler built-in */ }};
}
macro_rules! format {}
fn foo() {
assert!("hel<|>lo");
format!("hel<|>lo {}", 0);
}
"#,
);