-
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
VSCode plugin only works in main.rs #4177
Comments
It works for me in most files: But not in That doesn't work great because the file still lies outside of the project. Consider what happens if a file is A workaround is to replace the #[path = "koans/00_greetings/00_greetings.rs"]
mod greetings; This doesn't seem to break the |
More clearly, the issue with //- lib.rs
mod m1 {
struct S {
foo: i32,
}
include!("fun.rs");
}
mod m2 {
struct S {
foo: String,
}
include!("fun.rs");
}
//- fun.rs
fn frob(s: S) {
let _ = s.foo; // what type is this?
} |
Yeah, supporting code inside includes properly is kinda hard. That's on the radar, but is not a top priority at the moment. I am going to close this issue, as there's nothing immediatelly actionable here. |
same issue + 1 |
still the same issue |
Same issue goes on |
same issue here. It only works in main.rs! |
I would really like it if it also worked outside of my main.rs file. Did anyone find a work around to this? been 2 years and still no fix. |
You need to set up a proper module structure. If your code compiles, please provide an example. |
Idea: we can switch ra status to red if the currently opened file is .rs unknown to ra? Would also help #13226 |
I'm going through https://github.com/LukeMathWalker/build-your-own-jira-with-rust and had been previously using RLS. I just switched to rust-analyzer and the plugin is only working in the
main.rs
file. In any other file it doesn't work at all. Therun
links are in the file, but there is no auto-completion nor hints (hover or inlay).I went through the manual and first uninstalled RLS and restarted VSCode before even installing
rust-analyzer
.The text was updated successfully, but these errors were encountered: