Skip to content
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

As of nightly 2021-08-25, most macros cause missing-unsafe errors #10047

Closed
AaronKutch opened this issue Aug 26, 2021 · 8 comments
Closed

As of nightly 2021-08-25, most macros cause missing-unsafe errors #10047

AaronKutch opened this issue Aug 26, 2021 · 8 comments
Assignees

Comments

@AaronKutch
Copy link

AaronKutch commented Aug 26, 2021

Since some recent nightly (In the past week or two since I've updated), rust-analyzer is almost unusable for me on large codebases because of the number of errors produced.

A program as simple as this one:

fn main() {
    dbg!("hello?");
}

produces "this operation is unsafe and requires an unsafe function or block"

edit: actually, I don't know if my rust-analyzer is nightly, but I know it was updated just today

@matklad
Copy link
Member

matklad commented Aug 26, 2021

I believe that's fixed in #10032, will be in the next nightly!

Thanks for opening the issue and pinging me! I've kicked the nightly release, so that "next nightly" happens in ~20 minutes!

EDIT: the build https://github.com/rust-analyzer/rust-analyzer/actions/runs/1171225035

@OfekShochat
Copy link

OfekShochat commented Aug 27, 2021

thank you, happened to me too!

EDIT: it doesnt happen in the build you sent @lnicola

@lnicola
Copy link
Member

lnicola commented Aug 27, 2021

Let's close this as a duplicate of #10022. We can reopen it if it still happens in nightly or in the next release.

@lnicola lnicola closed this as completed Aug 27, 2021
@akhilman
Copy link

akhilman commented Sep 6, 2021

I have the same error in rust-analyzer 996300f 2021-09-05 dev

@bjorn3
Copy link
Member

bjorn3 commented Sep 6, 2021

Your rust-analyzer version is from 15 days ago. Updating it to the latest version should fix the problem.

@akhilman
Copy link

akhilman commented Sep 6, 2021

996300f seems to be latest version provided by rustup nightly toolchain components

@lnicola
Copy link
Member

lnicola commented Sep 6, 2021

Yeah, that's expected. There were some problems updating the rustup version. You can keep an eye on rust-lang/rust#88685.

@bjorn3
Copy link
Member

bjorn3 commented Sep 6, 2021

The rustup version will be updated in rust-lang/rust#88685. If you are lucky it will be included in the next rustc nightly.

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

6 participants