-
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
Diagnose files that aren't in the crate hierarchy #6377
Comments
It'd also be really great to have a big warning when editing a file that isn't in the module tree at all. |
According to the Rust discord, warnign about this is also apparently a feature in jetbrains. Would also address issues like this: #7345 |
Can we force rust-analyzer to include the file in the tree? |
I'm planning to add a quickfix that treats files like this as standalone crates instead. Blindly injecting them into the module hierarchy doesn't seem like the best idea. |
This is probably the best idea, most of the time when you are writing a standalone file, you only need standard completion and features. Unless other people have different experiences. |
7966: Diagnose files that aren't in the module tree r=jonas-schievink a=jonas-schievink Fixes #6377 I'm not sure if this is the best way to do this. It will cause false positives for all `include!`d files (though I'm not sure how much IDE functionality we have for these). Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
7966: Diagnose files that aren't in the module tree r=jonas-schievink a=jonas-schievink Fixes #6377 I'm not sure if this is the best way to do this. It will cause false positives for all `include!`d files (though I'm not sure how much IDE functionality we have for these). Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
I added a quickfix that adds the appropriate |
Is this going anywhere? Would be a wonderful feature. |
As of recently, we diagnose
mod m;
with a#[cfg]
that is currently inactive. We do not emit a diagnostic for the contents ofm.rs
though, which can be pretty confusing, since it just shows up as "IDE is not working" while editing m.rs.The text was updated successfully, but these errors were encountered: