Skip to content

Regression around proc-macros which change signatures #5448

@ndmitchell

Description

@ndmitchell

I have a project (closed-source alas) which has a proc-macro where you write:

#[foo]
fn myfun() {
   ...
}

And the proc-macro changes that to:

fn myfun(x: &str) {
    ...
}

Since my last upgrade to Rust Analyser 2020-07-13, when I call such functions I get the message:

Expected 0 arguments, found 1

This code works fine if I do cargo build or cargo check, but Rust Analyser displays a persistent error message. I tried Rust Analyser Nightly and that still has the same issue.

This code worked fine a few weeks ago. In case it's relevant, I'm on Rust Nightly 2020-07-12. I upgraded the toolchain the day before the IDE, and it seemed to work fine for that day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions