Open
Description
Consider the following macro:
macro_rules! what_number {
($num:literal) => {
what_number!(@inner $num)
};
(@inner 42) => {
"the answer to everything"
};
(@inner $num:literal) => {
stringify!($num)
};
}
fn main() {
let result = what_number!(42);
println!("{result}");
}
The compiler expands what_number!(42)
to "42"
, but RA shows "the answer to everything"
.
See here for an explanation of why "42" should be the correct result.
rust-analyzer version: rust-analyzer version: 0.0.0 (427061d 2022-06-19)
rustc version: rustc 1.63.0-nightly (ca122c7eb 2022-06-13)