unresolvedReference on many inherent methods from libcore on nightly rust (as of at least 2022-03-31
's nightly)
#11876
Labels
Broken Window
Bugs / technical debt to be addressed immediately
This is the issue version of this zulip thread. There may be more info in it: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Unresolved.20reference.20to.20slice.20methods.2E .
Rust analyzer is failing to resolve references of slice methods, and other things from libcore on some fairly simple code. Here's a screenshot (the red text with an underline is from the
unresolvedReference
scope in https://github.com/matklad/pale-fire):This screenshot is taken from https://github.com/thomcc/envparse/blob/e2002f9fd30eca8f3cba9ff3ef121333b5feb2b3/src/parse.rs#L81-L100 , which reproduces the issue, at least at that checkout. It seems like slices,
str
s,Option
, primitive numbers (not complete list, seems like a lot of things from libcore), don't have any of their inherent methods according to rust-analyzer.An exception is that things that come from traits appear to be understood by r-a even if those traits/impls are from libcore. (And more broadly everything else from libcore is present, like types, traits, enum variants, constants, etc are all present)
I've tired on the both the unstable (
rust-analyzer version: 0fe74175e 2022-04-02 nightly
) and stable (rust-analyzer version: bc08b8eff 2022-03-28 stable
) versions of rust-analyzer.I'm using the following version of Visual Studio Code (insider version):
And in case it matters, my rust version is:
The text was updated successfully, but these errors were encountered: