Use another name instead of dbg for test

This commit is contained in:
Edwin Cheng 2020-12-28 01:20:44 +08:00
parent be02ac981d
commit ee93037ed9

View file

@ -373,20 +373,20 @@ fn foo(a: A) {
fn macro_expansion_resilient() {
check(
r#"
macro_rules! dbg {
macro_rules! d {
() => {};
($val:expr) => {
match $val { tmp => { tmp } }
};
// Trailing comma with single argument is ignored
($val:expr,) => { $crate::dbg!($val) };
($val:expr,) => { $crate::d!($val) };
($($val:expr),+ $(,)?) => {
($($crate::dbg!($val)),+,)
($($crate::d!($val)),+,)
};
}
struct A { the_field: u32 }
fn foo(a: A) {
dbg!(a.$0)
d!(a.$0)
}
"#,
expect![[r#"