Skip to content

Wrong error report when macro in macro #7039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NichtsHsu opened this issue Dec 25, 2020 · 1 comment
Closed

Wrong error report when macro in macro #7039

NichtsHsu opened this issue Dec 25, 2020 · 1 comment

Comments

@NichtsHsu
Copy link

Write some code like:

use serde_json::json;

fn main() {
    let a = 1;
    let b = json!(format!("{}", a));
}

Obviously it can be compiled successfully.
But RA will report:

could not resolve macro `$crate::format`
@bjorn3
Copy link
Member

bjorn3 commented Dec 25, 2020

Duplicate of #6788

@bjorn3 bjorn3 marked this as a duplicate of #6788 Dec 25, 2020
@bjorn3 bjorn3 closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants