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
Put the cursor on Error and try to fix the missing name. std::error::Error will not be in the list of imports or qualifications; core::error::Error will be, but that is feature-gated so it won't compile. This also happens with the type paths created by completing a method declaration in a trait, e.g. source<TAB> in the trait body once the trait is qualified:
What happens
Start with something like this (
#[cfg(feature = "std")]
s omitted for simplicity):Put the cursor on
Error
and try to fix the missing name.std::error::Error
will not be in the list of imports or qualifications;core::error::Error
will be, but that is feature-gated so it won't compile. This also happens with the type paths created by completing a method declaration in a trait, e.g.source<TAB>
in the trait body once the trait is qualified:What should happen
rust-analyzer should instead use the stable path
std::error::Error
that is available.Versions
rust-analyzer version: 0.3.1657-standalone (326f37e 2023-09-10)
rustc version: rustc 1.72.0 (5680fa18f 2023-08-23)
The text was updated successfully, but these errors were encountered: