mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Revert "Proper handling $crate and local_inner_macros"
This commit is contained in:
parent
354c1daedc
commit
85cc3cfec9
7 changed files with 55 additions and 179 deletions
|
@ -370,37 +370,6 @@ expand!();
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_macro_with_dollar_crate_in_def_site() {
|
||||
check_types(
|
||||
r#"
|
||||
//- /main.rs crate:main deps:foo
|
||||
use foo::expand;
|
||||
|
||||
macro_rules! list {
|
||||
($($tt:tt)*) => { $($tt)* }
|
||||
}
|
||||
|
||||
fn test() {
|
||||
let r = expand!();
|
||||
r;
|
||||
//^ u128
|
||||
}
|
||||
|
||||
//- /lib.rs crate:foo
|
||||
#[macro_export]
|
||||
macro_rules! expand {
|
||||
() => { list!($crate::m!()) };
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! m {
|
||||
() => { 0u128 };
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_type_value_non_legacy_macro_use_as() {
|
||||
check_infer(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue