about summary refs log tree commit diff
path: root/tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs
diff options
context:
space:
mode:
authorWilfred Hughes <wilfred@meta.com>2024-06-05 17:28:08 -0700
committerWilfred Hughes <wilfred@meta.com>2024-06-05 17:44:07 -0700
commit901c01c2796d4056266fd3479806b0d408f8a602 (patch)
tree0d956c0f83add6321c4fc73c0053ef758678b555 /tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs
parent6e7eecc4236d1dbb7a7798edbd5e278bc86f7b91 (diff)
downloadrust-901c01c2796d4056266fd3479806b0d408f8a602.tar.gz
rust-901c01c2796d4056266fd3479806b0d408f8a602.zip
fix: Highlight unlinked files consistently with inactive files
Currently, rust-analyzer highlights the entire region when a `cfg` is
inactive (e.g. `#[cfg(windows)]` on a Linux machine). However,
unlinked files only highlight the first three characters of the file.

This was introduced in #8444, but users have repeatedly found
themselves with no rust-analyzer support for a file and unsure
why (see e.g. #13226 and the intentionally prominent pop-up added in
PR #14366).

(Anecdotally, we see this issue bite our users regularly, particularly
people new to Rust.)

Instead, highlight the entire inactive file, but mark it as all as
unused. This allows users to hover and run the quickfix from any line.

Whilst this is marginally more prominent, it's less invasive than a
pop-up, and users do want to know why they're getting no rust-analyzer
support in certain files.
Diffstat (limited to 'tests/ui/patchable-function-entry/patchable-function-entry-attribute.rs')
0 files changed, 0 insertions, 0 deletions