#![no_implicit_prelude]
does not disable macros
#138756
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-maybe-future-edition
Something we may consider for a future edition.
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: Compilation error, according to the language reference:
In particular, both the
macro_use
prelude and the standard library prelude should not be in scope, andassert!
is not a member of the language prelude, soassert!
should not be in scope.Instead, this happened: The code compiles. The macro is still in scope.
Meta
Tested with stable 1.85.1 and nightly 1.87.0-nightly (2025-03-19 1aeb99d).
I do not know whether this ever worked.
Prompted by a discussion in the Rust Community Discord server.
@rustbot label +A-macros
The text was updated successfully, but these errors were encountered: