mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Use another name instead of dbg for test
This commit is contained in:
parent
be02ac981d
commit
ee93037ed9
1 changed files with 4 additions and 4 deletions
|
@ -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#"
|
||||
|
|
Loading…
Reference in a new issue