Open neonaot opened 2 years ago
There are two macros with the same name, and plugin resolved imported one as macros from line 9.
Working code:
main.rs:
use myprocmacro::{Builder}; #[derive(Builder)] struct Foo { x: u8 } fn main() { let t = Foo{x: 2}; // Builder!(); println!("{}", answer()); }
lib.rs:
use proc_macro::TokenStream; #[proc_macro_derive(Builder)] pub fn builder2(_item: TokenStream) -> TokenStream { "fn answer() -> u32 { 42 }".parse().unwrap() } macro_rules! Builder { () => {println!("hello")}; }
Probably should support multiresolve in VisItem.scopedMacroToPsi and then do filtration by visibility
VisItem.scopedMacroToPsi
Environment
Problem description
There are two macros with the same name, and plugin resolved imported one as macros from line 9.
Working code:
Steps to reproduce
main.rs:
lib.rs: