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
When a crate contains extern crate std; rust-analyzer always want to import e.g. String and other alloc imports from std, even when preferNoStd is set and/or the crate is #![no_std]. For imports from core it seems to suggest both, but with core first.
I discovered this while working on a bevy crate that has extern crate std behind a feature flag, but it seems to be a problem regardless of the feature flag.
When a crate contains
extern crate std;
rust-analyzer always want to import e.g.String
and other alloc imports fromstd
, even when preferNoStd is set and/or the crate is#![no_std]
. For imports from core it seems to suggest both, but with core first.I discovered this while working on a bevy crate that has
extern crate std
behind a feature flag, but it seems to be a problem regardless of the feature flag.rust-analyzer version: rust-analyzer version: 0.4.2281-standalone
rustc version: rustc 1.84.0 (9fc6b4312 2025-01-07)
editor or extension: VScode v0.4.2281 (pre-release)
relevant settings:
settings.json
:code snippet to reproduce:
The text was updated successfully, but these errors were encountered: