-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Open
False positive
E0308 for macro 2.0 calling another macro in the same crate#21800Description
rust-analyzer version: rust-analyzer version: 0.4.2822-standalone (e0269ce 2026-03-10)
rustc version: rustc 1.96.0-nightly (e370b60cf 2026-03-07)
editor or extension: VS Code 1.112.0; rust-analyzer extension 0.4.2822;
relevant settings: N/A
code snippet to reproduce:
crate a, src/lib.rs:
#![feature(decl_macro)]
pub macro inner() {
true
}
pub macro outer() {{
fn __check() -> bool {
inner!()
}
true
}}
pub macro inner() {
true
}
pub macro outer() {{
fn __check() -> bool {
inner!()
}
true
}}
crate b, src/main.rs:
use a::outer;
fn main() {
outer!();
}
fn main() {
outer!();
}
Expected: No error. cargo +nightly build compiles.
Actual behavior:
expected bool, found ()
Metadata
Metadata
Assignees
Type
Fields
Give feedbackNo fields configured for issues without a type.