Skip to content
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

⬆️ rust-analyzer #100616

Merged
merged 63 commits into from
Aug 16, 2022
Merged

⬆️ rust-analyzer #100616

merged 63 commits into from
Aug 16, 2022

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Aug 16, 2022

r? @ghost

HKalbasi and others added 30 commits July 28, 2022 22:38
Previously added a blank _ => {} for match statements
fix: make `concat!` work with char

Fixes rust-lang#12921

- I avoided making `unquote_str()` take char literals as well because it's depended on by another function `parse_string()` that's only supposed to take strings.
- Even with this patch, we don't output `\0` as `\u{0}` which rust-lang#12921 pointed out ~~, but we're not actually responsible for serializing it but rowan is~~. They are functionally equivalent and I don't think it'd cause any confusion, but we *could* try escaping them before serialization (for reference, `rustc -Zunpretty=expanded`, which `cargo expand` uses under the hood, [makes use of `str::escape_default()`](https://github.com/rust-lang/rust/blob/3830ecaa8db798d2727cbdfa4ddf314ff938f268/compiler/rustc_ast/src/util/literal.rs#L161).
Add fixups for incomplete in proc-macros

Partially implements rust-lang/rust-analyzer#12777.

Added support for for loops and match statements.

I couldn't do paths like `crate::foo::` as I wasn't able to add `SyntheticTokens` to the end of `foo::`, they always ended up after `crate::`

This is my first contribution so please don't be shy about letting me know if I've done anything wrong!
Generate rust type from json

fix rust-lang#10118

Should this be a diagnostic? I made it a diagnostic because of issue label.
…Veykril

internal: Document CLI flag stability
[code] make toggleInlayHints understand {off,on}UntilPressed

fixes rust-lang#12964
…r=Veykril

Parse range patterns in struct and slice without trailing comma

Resolves rust-lang#12935

This patch includes the support for range patterns in slices, which is unstable (tracked in rust-lang#67264). If it's not desired I can remove it.
Corrected order of printing op and `=`

Fixes rust-lang/rust-analyzer#12971 where `Display` impl for assignment operators does `=+` instead of `+=`
Remove imports that are also in edition 2021's prelude

small cleanup
Fix pattern field completions not working for unions
Recover from missing ellipsis in record literals for path expressions
bors and others added 18 commits August 11, 2022 08:42
fix: Fix panic in `no_such_field` when using tuple fields on record structs
…, r=Veykril

Make `Name` hold escaped name

Resolves rust-lang#12787
Resolves rust-lang#99361

This PR effectively swaps `Name` and `EscapedName` in hir. In other words, it makes `Name` hold and print escaped raw identifiers and introduces another struct `UnescapedName` for cases where you need to print names without "r#" prefix.

My rationale is that it makes it easier for us to format an escaped name into string, which is what we want when we serialize names in general. This is because we format a name into string usually when we are presenting it to the users and arguably they expect its escaped form as that's what they see and write in the source code.

I split the change for `Name` into 3 commits to make it easier to follow but it also made some tests fail in the intermediate commits. I can squash them into a commit after the review if desired. I've also made similar changes for `ModPath` and `EscapedModPath` as it makes them consistent with `Name`.

For reference, there was a brief discussion on this in [a zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/escaping.20.60Name.60s).
Use Node 16 on CI and upgrade lockfile version

Code is on 16 too, there's hopefully no need to keep using the old version.
… scripts

rust-analyzer's RUSTC_WRAPPER unconditionally succeeds `cargo check`
invocations tripping up build scripts using `cargo check` to probe for
successful compilations. To prevent this from happening the RUSTC_WRAPPER
now checks if it's run from a build script by looking for the
`CARGO_CFG_TARGET_ARCH` env var that cargo sets only when running build
scripts.
Do not unconditionally succeed RUSTC_WRAPPER checks when run by build scripts

rust-analyzer's RUSTC_WRAPPER unconditionally succeeds `cargo check`
invocations tripping up build scripts using `cargo check` to probe for
successful compilations. To prevent this from happening the RUSTC_WRAPPER
now checks if it's run from a build script by looking for the
`CARGO_CFG_TARGET_ARCH` env var that cargo sets only when running build
scripts.
minor: Simplify `GlobalState::handle_event`
…kril

Move VSCode diagnostics workaroudn into client code
…kril

Pad empty diagnostic messages in relatedInformation as well

Follw up to rust-lang/rust-analyzer#13016
Take into account renamed extension id when launching
minor: Remove redundant --pre-release flag from publish
@lnicola
Copy link
Member Author

lnicola commented Aug 16, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 16, 2022

📌 Commit a06da98 has been approved by lnicola

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 16, 2022
TaKO8Ki added a commit to TaKO8Ki/rust that referenced this pull request Aug 16, 2022
…r=lnicola

⬆️ rust-analyzer

r? ``@ghost``
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 16, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#99942 (Fix nonsense non-tupled `Fn` trait error)
 - rust-lang#100609 (Extend invalid floating point literal suffix suggestion)
 - rust-lang#100610 (Ast and parser tweaks)
 - rust-lang#100613 (compiletest: fix typo in runtest.rs)
 - rust-lang#100616 (:arrow_up: rust-analyzer)
 - rust-lang#100622 (Support 128-bit atomics on all aarch64 targets)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1d23d3a into rust-lang:master Aug 16, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 16, 2022
@lnicola lnicola deleted the rust-analyzer-2022-08-16 branch August 16, 2022 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.