You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached code incorrectly (?) reports a call to an unsafe function.
This is only shown in-IDE (Zed or Helix). It is not shown with cargo check or cargo clippy.
The code in question is just a call to produce a new array, with populated values.
(There is no visible issue at runtime.)
I was able to get the code down to what looks like any vec of arrays.
In-IDE error:
rust-analyzer: call to unsafe function is unsafe and requires an unsafe function or block
Here's the minimal example as a cargo-script: dbg_incorrect-unsafe-error-minimal.rs
And (probably not needed) here's the orignating non-minimal example as a cargo-script: dbg_incorrect-unsafe-error.rs
(I realize that rust-analyzer doesn't yet work with cargo-script at the time of posting. But hopefully soon! Figured it would still be best practice. :)
The text was updated successfully, but these errors were encountered:
The attached code incorrectly (?) reports a call to an unsafe function.
This is only shown in-IDE (Zed or Helix). It is not shown with
cargo check
orcargo clippy
.The code in question is just a call to produce a new array, with populated values.
(There is no visible issue at runtime.)
I was able to get the code down to what looks like any vec of arrays.
In-IDE error:
Minimal-Example-Helix:



Helix:
Zed:
with Zed or Helix:
rust-analyzer 1.86.0-nightly (b3b368a1 2025-01-05)
rustc 1.86.0-nightly (b3b368a18 2025-01-05)
Zed 0.167.1 – /Applications/Zed.app
helix 25.1 (dabfb6ce)
Here's the minimal example as a cargo-script: dbg_incorrect-unsafe-error-minimal.rs
And (probably not needed) here's the orignating non-minimal example as a cargo-script: dbg_incorrect-unsafe-error.rs
(I realize that rust-analyzer doesn't yet work with cargo-script at the time of posting. But hopefully soon! Figured it would still be best practice. :)
The text was updated successfully, but these errors were encountered: