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

rust-analyzer: Unresolved macro call for dotenv! #1

Closed
allan2 opened this issue Feb 28, 2022 · 2 comments · Fixed by #45
Closed

rust-analyzer: Unresolved macro call for dotenv! #1

allan2 opened this issue Feb 28, 2022 · 2 comments · Fixed by #45

Comments

@allan2
Copy link
Owner

allan2 commented Feb 28, 2022

This is the same issue as rust-analyzer #9606.

When using rust-analyzer with dotenv!, this mesage appears:

unresolved macro `dotenv!`rust-analyzerunresolved-macro-call

Example repo: https://github.com/allan2/dotenv-macro

src/main.rs:

use dotenvy_codegen::dotenv;

fn main() {
    println!("{}", dotenv!("MSG"));
}

The issue appears to be related to proc-macro-hack according to this comment.

@kdwarn
Copy link

kdwarn commented Dec 1, 2022

Is this still an issue with newer versions of rust-analyzer? I'm not getting that message in either Neovim or Helix, with rust-analyzer 1.65.

@sonro
Copy link
Collaborator

sonro commented Dec 5, 2022

I haven't seen this myself. Either way, proc_macro_hack can be removed: see #43.

@allan2 allan2 closed this as completed in #45 Dec 6, 2022
allan2 pushed a commit that referenced this issue Dec 14, 2022
#1 and [rust-analyzer #9606](rust-lang/rust-analyzer#9606) are resolved.
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

Successfully merging a pull request may close this issue.

3 participants