Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

False positive E0308 for macro 2.0 calling another macro in the same crate #21800

Open
Open
False positive E0308 for macro 2.0 calling another macro in the same crate#21800
Labels
A-macromacro expansionB-unstableunstable featureC-bugCategory: bug

Description

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
}}

crate b, src/main.rs:

use a::outer;

fn main() {
outer!();
}

Expected: No error. cargo +nightly build compiles.
Actual behavior:

expected bool, found ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansionB-unstableunstable featureC-bugCategory: bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions