-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect import suggestion when using rhai
#16436
Comments
Actually, this might be something on rustc side too - rust-lang/rust#120416. |
is this specifically about the quickfix for the dignostic or is this about rust-analyzer's import assist? If the former then that's a rustc issue as you pointed out. If the latter has the same problem it's also rust-analyzer related |
Do you mean that quickfix here comes from rustc and not from the rust-analyzer itself? It was importing types from rhai even with rustc correctly suggesting std types. |
If you're unsure, try it with |
Just tried without |
Got somewhat strange behavior when working with
rhai
. Here's the minimal example.Cargo.toml
:main.rs
:This code errors as expected, but when I try to use code actions to apply auto fixes, VSCode with RA offers to auto import
rhai::Shared
andrhai::Locked
, instead ofstd::rc::Rc
andstd::cell::RefCell
.cargo check
shows suggestions correctly, so it's purely rust-analyzer problem.rust-analyzer version: 0.3.1815-standalone
rustc version: 1.75.0 (82e1608df 2023-12-21)
The text was updated successfully, but these errors were encountered: