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() {
|
fn macro_expansion_resilient() {
|
||||||
check(
|
check(
|
||||||
r#"
|
r#"
|
||||||
macro_rules! dbg {
|
macro_rules! d {
|
||||||
() => {};
|
() => {};
|
||||||
($val:expr) => {
|
($val:expr) => {
|
||||||
match $val { tmp => { tmp } }
|
match $val { tmp => { tmp } }
|
||||||
};
|
};
|
||||||
// Trailing comma with single argument is ignored
|
// Trailing comma with single argument is ignored
|
||||||
($val:expr,) => { $crate::dbg!($val) };
|
($val:expr,) => { $crate::d!($val) };
|
||||||
($($val:expr),+ $(,)?) => {
|
($($val:expr),+ $(,)?) => {
|
||||||
($($crate::dbg!($val)),+,)
|
($($crate::d!($val)),+,)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
struct A { the_field: u32 }
|
struct A { the_field: u32 }
|
||||||
fn foo(a: A) {
|
fn foo(a: A) {
|
||||||
dbg!(a.$0)
|
d!(a.$0)
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
|
|
Loading…
Reference in a new issue