Closed
Description
Current behavior:
//- /main.rs crate:main deps:lib
use lib::path;
macro_rules! vec {
( $e:expr ) => { $e };
}
fn f() {
path![];
//^^^^^^^ could not resolve macro `$crate::inner`
}
//- /lib.rs crate:lib
#[macro_export]
macro_rules! path {
() => { vec![$crate::inner!()] };
}
#[macro_export]
macro_rules! inner {
() => { 0 };
}
Expected behavior: The macro should be resolved correctly.
This causes incorrect diagnostics in crates/hir_ty/src/diagnostics/expr.rs
, and probably all places that invoke the path!
macro.