Skip to content

Inlay hints not working in macro call #11323

@blaumeise20

Description

@blaumeise20

rust-analyzer version: 0add6e9 2021-12-20 stable

rustc version: rustc 1.60.0-nightly (ee5d8d3 2022-01-17)

When creating macros that accept blocks, if you declare a let, it doesn't show you the type. Doesn't work with function call parameter names either.

Bildschirmfoto 2022-01-20 um 11 52 58

fn main() {
    macro_rules! foo {
        (bar $b:block) => {
            $b
        }
    }

    fn baz(val: i32) {
        println!("baz {}", val);
    }

    foo!(bar {
        let x = 123;
        baz(x);
        println!("Hello, world!");
    });

    let x = 123;
    baz(x);
    println!("Hello, world!");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions