Open
Description
macro_rules! outer {
($block:block) => {
{
macro_rules! with_dollar_sign {
($a:tt => $b:tt) => {
macro_rules! __with_dollar_sign { $a => $b }
__with_dollar_sign!($);
}
}
with_dollar_sign! {
($d:tt) => {
macro_rules! inner {
($blk:block) => {
$blk
};
}
}
}
$block
}
};
}
fn main() {
outer!({
let s = String::new();
s.len();
inner!({
s.len();
});
});
}
Hover does not work within the inner!
invocation here.
According to "Expand macro recursively" we expand inner!
just fine, but fail to expand __with_dollar_sign!
to the definition of inner!
, which makes no sense:
{
macro_rules!with_dollar_sign {
($a:tt = > $b:tt) = >{
macro_rules!__with_dollar_sign {
$a = > $b
}__with_dollar_sign!($);
}
}macro_rules!__with_dollar_sign {
($d:tt) = >{
macro_rules!inner {
($blk:block) = >{
$blk
};
}
}
}__with_dollar_sign!($);
{
let s = String::new();
s.len();
{
s.len();
};
}
}
It is possible that that part is due to a bug in the implementation of "Expand macro recursively".