Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"could not resolve macro 'm'" when macro imported into function directly #7437

Closed
hrydgard opened this issue Jan 25, 2021 · 1 comment
Closed

Comments

@hrydgard
Copy link

image

Here's a very simple repro:

src/main.rs:

extern crate a;

fn main() {
    use a::m;
    m!{};
}

Cargo.toml:

[package]
name = "repro"
version = "1.0.0"
[dependencies]
a = { path = "a" }

a/src/lib.rs:

#[macro_export]
macro_rules! m {
    () => {};
}

a/Cargo.toml:

[package]
name = "a"
version = "1.0.0"
[dependencies]

With the above, cargo run works just fine while rust-analyzer chokes on the use of the macro.

@Veykril
Copy link
Member

Veykril commented Jan 25, 2021

Local imports aren't yet supported at all unfortunately

Duplicate of #1165

@Veykril Veykril closed this as completed Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants