-
Notifications
You must be signed in to change notification settings - Fork 164
no_std Can't find crate for 'test' #729
Comments
Did you manage to solve this? I'm experiencing the same :-) I do notice I'm also using the |
No luck so far @imjasonmiller, but I haven’t dug into it. |
@rubberduck203 I solved it in my case — see the linked issue. Hopefully it is of use to you. :-) |
Confirmed works. Thanks @imjasonmiller. {
"rust.target": "thumbv7em-none-eabihf",
"rust.all_targets": false
} |
And for anyone using rust-analyzer + vscode, the
Thanks @imjasonmiller |
This solution fixes "can't find crate for 'core'" but not "for 'test'". |
Sadly, this is not working for me. I'm using RLS not rust-analyzer. I'm still getting "can't find crate for |
Me too. I'm getting this on my main.rs. |
Me too. I wonder that it may need another equivelant settings to this in {
"rust-analyzer.checkOnSave.extraArgs": [
"--bins"
],
} |
I cannot resolve error However I could resolve it with using rust-analyzer plugin on VSCode. I think that configuration for rust-analyzer via the rust-plugin. |
@asukiaaa if rust-analyzer works, do you have any reason to avoid it? |
I can use rust-analyzer plugin with disabling rust-plugin (this plugin) but what the meaning of presence for rust-plugin? |
rust-analyzer will sooner or later replace RLS (and the Rust extension), see also #927. |
I see, thank you for the information. |
For people using rust analyzer with coc and neovim, look for coc-settings.json in google for rust analyzer and fill those attributes |
not worked for me ~ |
Not working
|
Ran into this same issue and was able to fix it by adding the following to my
|
Solution for rust-analyzer Add these lines in {
"rust-analyzer.cargo.target": "thumbv7em-none-eabihf",
"rust-analyzer.checkOnSave.allTargets": false,
} |
I have a
no_std
crate that is returning this single error message.The code builds fine.
This is the contents of the
lib.rs
file that is causing the error message.I found these possibly related issues (but I'm doubtful they're actually related).
can't find crate
when crate is referred to via relative path (in a workspace) rls#1409The text was updated successfully, but these errors were encountered: