rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Files included using `include!()` macro in `lib.rs` are still `unlinked-file`

Open NessajCN opened this issue 8 months ago • 1 comments

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 or CARGO_HOME)

repository link (if public, optional): (eg. rust-analyzer)

code snippet to reproduce:

// src/lib.rs
include!("xx.rs");
// src/xx.rs
// Statements defined here all indicates: file not included in module tree rust-analyzer (unlinked-file)
// which worked perfect in previous versions.
pub const YY: u8 = 0xff;

Having tested in both Linux (Archlinux+KDE) and MacOS. Reproduced.

NessajCN avatar Jun 11 '24 09:06 NessajCN