mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-17 02:42:54 +00:00
Fix expression scope calculation when within macro expansions
This commit is contained in:
parent
882ae7105d
commit
bfb187aacd
7 changed files with 99 additions and 33 deletions
|
|
@ -102,10 +102,20 @@ macro without_args {
|
|||
}
|
||||
}
|
||||
|
||||
macro_rules! id {
|
||||
($($tt:tt)*) => {
|
||||
$($tt)*
|
||||
};
|
||||
}
|
||||
|
||||
include!(concat!("foo/", "foo.rs"));
|
||||
|
||||
struct S<T>(T);
|
||||
fn main() {
|
||||
struct TestLocal;
|
||||
// regression test, TestLocal here used to not resolve
|
||||
let _: S<id![TestLocal]>;
|
||||
|
||||
format_args!("Hello, {}!", (92,).0);
|
||||
dont_color_me_braces!();
|
||||
noop!(noop!(1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue