Skip to content

macros with std prelude macro names are resolved incorrectly #12100

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
Veykril opened this issue Apr 27, 2022 · 1 comment · Fixed by #12689
Closed

macros with std prelude macro names are resolved incorrectly #12100

Veykril opened this issue Apr 27, 2022 · 1 comment · Fixed by #12689
Labels
A-ide general IDE features A-macro macro expansion A-nameres name, path and module resolution C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Apr 27, 2022

macro_rules! eprintln {
    () => {};
}

The name of the macro here does not resolve in regards to the IDE layer. Macro expansion expands the std one which is wrong.

@Veykril Veykril added A-nameres name, path and module resolution C-bug Category: bug A-ide general IDE features A-macro macro expansion labels Apr 27, 2022
@Veykril
Copy link
Member Author

Veykril commented Apr 27, 2022

Most likely due to this fixme

// FIXME: Macro shadowing in one module is not properly handled. Non-item place macros will
// be all resolved to the last one defined if shadowing happens.

at least for the IDE layer bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ide general IDE features A-macro macro expansion A-nameres name, path and module resolution C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant