-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Standard macros reported as missing-unsafe #10022
Comments
Maybe rust-analyzer ignores |
I've also met with the error. To reproduce it, just create a new executable crate and |
This was introduced by a rustc nightly in the last few days, not by a rust-analyzer release. I held The problem started with Hint for cargo-bisect-rustc, which will crash unwrapping an invalid channel name in rust-toolchain.toml if you leave one hanging around at any point during the bisect run:
|
The change that causes this behavior was in rustc, but the root bug is in rust-analyzer: #10022 (comment) |
No. This attribute only by-pass the The issue here is that we expand the builtin macro But I think simply making the expansion contains an |
Ah, right. |
10032: Fix missing unsafe block for the nightly change r=lnicola a=oxalica Fix #10022 Tested via vscode extension. Co-authored-by: oxalica <[email protected]>
Hi there,
I'm using rust-analyzer (
rust-analyzer 996300f4a 2021-08-23 dev
) installed with the arch linuxrust-analyzer
package in Sublime Text 4 with the LSP package and an up to date nightly rust compiler (rustc 1.56.0-nightly (b03ccace5 2021-08-24)
). Today, rust-analyzer started reportingthis operation is unsafe and requires an unsafe function or block
on thedbg!
,eprintln!
andprintln!
(list probably not exhaustive) macros. Minimal example:I tried downgrading the arch package to last weeks rust-analyzer but that didn't change anything. But apparently, this has something to do with todays nightly because when using
rustc 1.56.0-nightly (af140757b 2021-08-22)
the issue disappears. However, runningcargo check
reports no issues.I'm not quite sure if this is the right place to report this issue, but since
cargo check
works fine regardless of the compiler version I thought, I'd best start here. I'd be happy to provide additional information if necessary. Is there a way I can make rust-analyzer report the errors on the command line so I can exclude my editor as a potential error source?The text was updated successfully, but these errors were encountered: