ICE with proc_macro_attribute on pub(super) function in module #68921
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Compiler panicks when there is function with both
#[proc_macro_attribute]
andpub(super)
defined in module (not in the root of the crate).lib.rs
:m.rs
:All following functions successfully does not compile (which is fine):
RUST_BACKTRACE=1
RUST_BACKTRACE=full
log is available here: https://gist.github.com/iliakonnov/8dbf25041e46c3861f4e1cf2237315f8#file-backtrace-full-logI expected to see
error: functions tagged with `#[proc_macro_attribute]` must currently reside in the root of the crate
instead of ICEUPD: Also reproduces without
--crate-type proc-macro
. Justrustc lib.rs
is enoughThe text was updated successfully, but these errors were encountered: