Context:
On Rust's Discord channel @dtm421 reported issue with error when using RLS:
found crate unicode_segmentation compiled by an incompatible version of rustc
After investigation it became clear the reason was rustup package from Solus repository.
The problem:
The error occurred because IDE calls rustup run <toolchain_name> rls which leads to toolchain installed by rustup but the cargo, rustc in PATH are coming from rust package resulting in the clash.
Arch Linux solved it by creating necessary symlinks pointing to rustup and making rustup conflict with rust.
For the reference installing from https://rustup.rs creates proxy binaries inside ~/.cargo/bin and adds it to the PATH.
Possible solutions:
- Create symlinks like Arch Linux does and make the package conflict with rust.
- Make rustup create proxy binaries in ~/.cargo/bin even if installed via package manager.