-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup many PRs to clear out the queue #8444
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code like this is fixed now: ``` fn foo(p: [u8, ..4]) { match p { [a, b, c, d] => {} }; } ``` Invalid constructors are not reported as errors yet: ``` fn foo(p: [u8, ..4]) { match p { [_, _, _] => {} // this should be error [_, _, _, _, _, .._] => {} // and this _ => {} } } ``` Issue rust-lang#8311 is partially fixed by this commit. Fixed-length arrays in let statement are not yet allowed: ``` let [a, b, c] = [1, 2, 3]; // still fails ```
Add new variable rust-indent-offset, defaulting to the old value, and use it.
…ster/rust into rollup Conflicts: src/libsyntax/opt_vec.rs
bors
added a commit
that referenced
this pull request
Aug 10, 2013
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Jun 23, 2024
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 rust-lang#8444, but users have repeatedly found themselves with no rust-analyzer support for a file and unsure why (see e.g. rust-lang#13226 and the intentionally prominent pop-up added in PR rust-lang#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.
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Jun 23, 2024
…eykril 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 rust-lang#8444, but users have repeatedly found themselves with no rust-analyzer support for a file and unsure why (see e.g. rust-lang#13226 and the intentionally prominent pop-up added in PR rust-lang#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. Before (note the subtle grey underline is only at the beginning of the first line): ![Screenshot 2024-06-05 at 5 41 17 PM](https://github.com/rust-lang/rust-analyzer/assets/70800/96f5d778-612e-4838-876d-35d9647fe2aa) After (user can hover and fix from any line): ![Screenshot 2024-06-05 at 5 42 13 PM](https://github.com/rust-lang/rust-analyzer/assets/70800/6af90b79-018c-42b9-b3c5-f497de2ccbff)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This merges these PR together:
#8430: r=thestinger
#8370: r=thestinger
#8386: r=bstrie
#8388: r=thestinger
#8390: r=graydon
#8394: r=graydon
#8402: r=thestinger
#8403: r=catamorphism