Prelude is not resolved after toolchain override
See original GitHub issueI noticed that the general name resolution is broken when there are too many changes (for example when rebasing and moving around in history a lot) and I had to delete the contents of lib.rs
to fix the issue. Now the prelude is not resolved, which is making it very hard to work even after trying to disable then re-enable the Rust Plugin.
Environment
- IntelliJ Rust plugin version: 0.2.115.2157-193
- Rust toolchain version: 1.40
- IDE name and version: PyCharm 2019.3 (#PY-193.5233.109)
- Operating system: Linux 5.4.0-3-amd6
Steps to reproduce
I’m not sure when it started.
If you want the state I’m in:
hg clone https://foss.heptapod.net/octobus/mercurial-devel
hg up b561fdbcc60
cd rust/hg-cpython/
cargo c (to make sure that it compiles)
EDIT: it seems that the real issue is setting a toolchain override with rustup. It confuses the plugin.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Installing the Rust compiler and toolchain
You can change to the nightly toolchain easily with rustup. ... the recommended way to install the toolchain is to run the following...
Read more >Overrides - The rustup book
A relative path is resolved relative to the location of the rust-toolchain.toml file. Default toolchain. If no other overrides are set, the global...
Read more >Pedantic Clippy | Yury Zhauniarovich
If you do not want to change source code, you can run clippy with special command line arguments that would enable (or disable)...
Read more >Bug listing with status RESOLVED with resolution INVALID as ...
status:RESOLVED resolution:INVALID severity:major · Bug:19358 - "rhide can not be emerged becose of setedit, it has different MD5 and if a change MD5...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another, less brutal solution is to use
rustup which cargo
inside the folder with the local override and use thebin/
folder where this toolchain’s cargo is located as the toolchain location, andlib/rustlib/src/rust/src
as the stdlib location.That way you can still have the default version be whatever you want, but this is a bit cumbersome.
For those using relatively recent versions of Rust (this comment was prompted by Debian stable’s upgrade to 1.41.1), you need to install the
rust-src
component in yourrustup
toolchain to have thesrc
folder inrustlib
.rustup component add rust-src
, then (re)install your toolchain.