Open NessajCN opened 1 month ago
Hmm right, this file is in fact not a module, so when we try to resolve it as one we fail emitting the diagnostic. Semantics::file_to_module_def
should probably have a fallback check for files that don't resolve to one and then check if the file is included treating the callee module of the include!
as the module maybe.
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.