Skip to content

Macro error with slog::record_static! #11456

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

Closed
remoun opened this issue Feb 11, 2022 · 3 comments
Closed

Macro error with slog::record_static! #11456

remoun opened this issue Feb 11, 2022 · 3 comments
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@remoun
Copy link

remoun commented Feb 11, 2022

Using slog::record_static! yields in an unresolved-macro-call error.

This seems different from #6835 in that the macro in question does not use proc_macro_hack

rust-analyzer version: ba33054 2022-02-07 stable

rustc version: rustc 1.55.0-nightly (b41936b92 2021-07-20)

@remoun
Copy link
Author

remoun commented Feb 11, 2022

When I turned on RA logging, I notice a bunch of errors around macro parsing: [WARN hir_expand::db] fail on macro_parse: (reason: UnresolvedProcMacro macro_call: #[derive(Debug, Display)]

Pretty much the same error, repeated for many definitions.

@bjorn3
Copy link
Member

bjorn3 commented Feb 12, 2022

That nightly version is several months old. We only support the latest nightly, latest beta and several stable releases. The proc macro abi is unstable and may have changed between the nightly you use and the final stable release in which case rust-analyzer can't expand it. Try updating your nightly or switching to stable.

@jonas-schievink
Copy link
Contributor

record_static! works fine for me, on the current r-a master and Rust stable 1.58.1, so this looks indeed like an issue caused by using an unsupported Rust version

@jonas-schievink jonas-schievink added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Feb 14, 2022
@remoun remoun closed this as completed Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests

3 participants