-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Files included using include!()
macro in lib.rs
are still unlinked-file
#17390
Comments
Hmm right, this file is in fact not a module, so when we try to resolve it as one we fail emitting the diagnostic. |
Hey @Veykril // src/lib.rs
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
include!("./xx.rs"); Warnings like |
That is a separate issue so please open an ew one |
ok |
fix: Resolve included files to their calling modules in IDE layer Fixes rust-lang/rust-analyzer#17390 at the expense of reporting duplicate diagnostics for modules that have includes in them when both the calling and called file are included.
rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
rust-analyzer version: 0.4.1994-standalone [/home/nessaj/.vscode/extensions/rust-lang.rust-analyzer-0.4.1994-linux-x64/server/rust-analyzer]
rustc version: (eg. output of
rustc -V
)rustc 1.78.0 (9b00956e5 2024-04-29)
editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable)
VSCode 1.90.0 rust-analyzer v0.4.1994 (pre-release)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
)repository link (if public, optional): (eg. rust-analyzer)
code snippet to reproduce:
Having tested in both Linux (Archlinux+KDE) and MacOS. Reproduced.
The text was updated successfully, but these errors were encountered: