Commit graph

165161 commits

Author SHA1 Message Date
A4-Tacks
c9fbcdcfcd
Add let in let-chain completion support
Example
---
```rust
fn f() {
    if true && $0 {}
}
```
->
```rust
fn f() {
    if true && let $1 = $0 {}
}
```
2025-08-22 21:58:49 +08:00
Kirill Bulatov
b38dd2acb5 Use a more specific error message when talking about the server logs 2025-08-15 20:15:21 +03:00
jackh726
06336efca9 add comment 2025-08-15 05:04:41 +00:00
jackh726
cc3c5cfb2e Add test for webrender-2022 metrics 2025-08-15 05:03:44 +00:00
Lukas Wirth
0dbacbc957
Merge pull request #20453 from jackh726/nts-part2
Fix webrender-2022 metrics - shift vars when mapping dyn
2025-08-14 21:27:42 +00:00
Ralf Anton Beier
58ec13d793
feat: hint at unterminated strings in unknown prefix errors
When encountering 'unknown literal prefix' errors, check for unbalanced
quotes in recent code and suggest checking for unterminated string literals.
2025-08-14 19:30:29 +02:00
Lukas Wirth
6772f18557 Track diagnostic generations per package 2025-08-14 14:33:50 +02:00
Shoyu Vanilla (Flint)
6e55052f42
Merge pull request #20455 from A4-Tacks/fix-indent-conv-match-to-let-else
Fix indent for convert_match_to_let_else
2025-08-14 08:23:48 +00:00
Shoyu Vanilla (Flint)
82006f9c8f
Merge pull request #20456 from A4-Tacks/match-with-if-let-guard
Add guard to let-chain for replace_match_with_if_let
2025-08-14 08:22:05 +00:00
A4-Tacks
c78177b7f9
Add guard to let-chain for replace_match_with_if_let
```rust
fn main() {
    match$0 Some(0) {
        Some(n) if n % 2 == 0 && n != 6 => (),
        _ => code(),
    }
}
```
->
```rust
fn main() {
    if let Some(n) = Some(0) && n % 2 == 0 && n != 6 {
        ()
    } else {
        code()
    }
}
2025-08-14 10:07:25 +08:00
A4-Tacks
861f9122c8
Fix indent for convert_match_to_let_else
Example
---
```
//- minicore: option
fn f() {
    let x$0 = match Some(()) {
        Some(it) => it,
        None => {//comment
            println!("nope");
            return
        },
    };
}
```

**Old output**:

```rust
fn f() {
    let Some(x) = Some(()) else {//comment
            println!("nope");
            return
        };
}
```

**This PR output**:

```rust
fn f() {
    let Some(x) = Some(()) else {//comment
        println!("nope");
        return
    };
}
```
2025-08-14 08:34:31 +08:00
jackh726
8e5818df2e Shift vars when mapping Dyn 2025-08-13 19:50:15 +00:00
jackh726
23e8a1e139 Don't panic if unable to identify host in metrics 2025-08-13 19:49:59 +00:00
Chayim Refael Friedman
fbf642e32d
Merge pull request #20390 from A4-Tacks/if-else-comp-in-args-or-let
Add if..else completions in LetStmt and ArgList
2025-08-13 16:44:39 +00:00
Chayim Refael Friedman
a5e2a53b5c
Merge pull request #20448 from donni-h/patch-2
Fix dead link to Cargo.toml in documentation
2025-08-13 16:42:15 +00:00
Wilfred Hughes
8ef6a8ff6d [internal] Update to the latest @vscode/vsce for extension build
This isn't a logic change, but it fixes an npm warning during the
build. vsce itself hasn't had any major changes between 3.2.2 and 3.6.

* https://github.com/microsoft/vscode-vsce/releases/tag/v3.3.0
* https://github.com/microsoft/vscode-vsce/releases/tag/v3.4.0
* https://github.com/microsoft/vscode-vsce/releases/tag/v3.5.0
* https://github.com/microsoft/vscode-vsce/releases/tag/v3.6.0
2025-08-13 15:25:34 +01:00
donni-h
1d57d7800d
Fix dead link to Cargo.toml in documentation
../../Cargo.toml resolves to https://rust-analyzer.github.io/Cargo.toml, which is an invalid link
2025-08-13 13:03:52 +02:00
Lukas Wirth
b7e4b28c3b
Merge pull request #20446 from lcnr/kinda-unhelpful-3
next-solver fun time
2025-08-13 10:17:53 +00:00
lcnr
67b1e32908 manually normalize alias 2025-08-13 11:00:00 +02:00
lcnr
5849fef132 layout_of uses PostAnalysis 2025-08-13 10:57:45 +02:00
lcnr
00941b3142 implement type_of_opaque 2025-08-13 10:57:45 +02:00
Lukas Wirth
9b089011a0
Merge pull request #20376 from fee1-dead/traitalias
Merge Trait and TraitAlias handling
2025-08-13 08:27:54 +00:00
Lukas Wirth
178007c0fd
Merge pull request #20445 from rust-lang/veykril/push-twmmuyzwtxno
fix: Attach db for inlay hint compute
2025-08-13 08:01:19 +00:00
lcnr
39ac6e1eed update a few fixmes, and one trivial improvement 2025-08-13 10:01:17 +02:00
Lukas Wirth
4bbbe6ee2b fix: Attach db for inlay hint compute 2025-08-13 09:42:50 +02:00
Deadbeef
b62116bda7 fix errors after rebase 2025-08-13 15:33:08 +08:00
Lukas Wirth
2a509717b4 Fix metrics checking out repos into toplevel folder instead of target 2025-08-13 09:31:03 +02:00
Lukas Wirth
b416845683 Print fields of interned IDs in hir-ty instead of just the ID 2025-08-13 09:29:04 +02:00
Deadbeef
0d2f8aff1b add test for trait alias projections 2025-08-13 15:28:08 +08:00
Deadbeef
8d247472e5 Merge Trait and TraitAlias handling 2025-08-13 15:28:08 +08:00
Lukas Wirth
6e4644fd31
Merge pull request #20329 from jackh726/next-trait-solver-querify
Switch from Chalk to the next trait solver
2025-08-13 06:10:45 +00:00
Chayim Refael Friedman
40b8d41367
Merge pull request #20432 from sgasho/fix/20215_implement_default_member_to_resolve_ident_pat
Fix "Implement default members" to resolve IdentPat
2025-08-12 13:18:36 +00:00
sgasho
875c158686 fix: Implement default member to resolve IdentPat 2025-08-12 21:53:50 +09:00
Shoyu Vanilla (Flint)
c14814cb66
Merge pull request #20434 from ShoyuVanilla/diag-fix-again
fix: Panic while trying to clear old diagnostics while there's nothing
2025-08-11 15:35:38 +00:00
Shoyu Vanilla
6c3c620e6b fix: Panic while trying to clear old diagnostics while there's nothing 2025-08-12 00:24:44 +09:00
Chayim Refael Friedman
2e4c8e2b66
Merge pull request #20420 from iorizu/doc-symbols-filter
feat: Add Config Option to Exclude Locals from Document Symbol Search
2025-08-11 14:46:18 +00:00
Shoyu Vanilla (Flint)
7daaa4ee01
hotfix: Update flycheck diagnostics generation 2025-08-11 18:18:55 +09:00
The rustc-josh-sync Cronjob Bot
0585bdff8b Merge ref '21a19c297d' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 21a19c297d
Filtered ref: 9a5c1fb93028e1a29a7598ce782efb0c5d7be534

This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-11 04:30:34 +00:00
The rustc-josh-sync Cronjob Bot
af10cb727f Prepare for merging from rust-lang/rust
This updates the rust-version file to 21a19c297d.
2025-08-11 04:25:52 +00:00
Ifeanyi Orizu
00d000ce74 Fix minor things 2025-08-10 17:48:17 -05:00
Ifeanyi Orizu
802fa9255b Add config option to exclude locals from doc search 2025-08-10 17:48:17 -05:00
Jacob Pratt
92bdf9e8ee
Rollup merge of #145121 - lambdageek:dist-must-keep-llvm-third-party-siphash, r=Kobzol
bootstrap: `x.py dist rustc-src` should keep LLVM's siphash

Fixes rust-lang/rust#145117
2025-08-10 15:43:54 -04:00
Shoyu Vanilla (Flint)
bd46f7b6ae
Merge pull request #20419 from ShoyuVanilla/flyck-gen
internal: Make flycheck generational
2025-08-10 14:00:52 +00:00
Shoyu Vanilla
b9f2bb7dd1 internal: Make flycheck generational 2025-08-10 22:10:55 +09:00
Stuart Cook
53eab6bc75
Rollup merge of #145156 - Kobzol:cargo-build-dir, r=lqd,jieyouxu
Override custom Cargo `build-dir` in bootstrap

The context for this issue is in https://github.com/rust-lang/rust/issues/145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory.

Tested by putting the following:
```toml
[build]
build-dir = "/tmp/foo"

[unstable]
build-dir = true
```

into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR.

Fixes: https://github.com/rust-lang/rust/issues/145107
2025-08-10 19:45:53 +10:00
Stuart Cook
c15c2f0a42
Rollup merge of #145135 - Kivooeo:stabilize-duration_constructors_lite, r=ChrisDenton
Stabilize `duration_constructors_lite` feature

This closes [tracking issue](https://github.com/rust-lang/rust/issues/140881) and stabilises `Duration::from_hours` and `Duration::from_mins` while not touching a `duration_constructors` feature from the related [tracking issue (2)](https://github.com/rust-lang/rust/issues/120301)
2025-08-10 19:45:51 +10:00
Stuart Cook
2e0829173b
Rollup merge of #145129 - dpaoliello:arm64eclink, r=wesleywiser
[win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC

When the MSVC linker sees an Arm64EC object file, it needs to know if it's linking the final executable as Arm64EC or Arm64X.

This change adds the `/machine:arm64ec` flag to the linker when building LLVM as Arm64EC to avoid that ambiguity (and resulting linker error).
2025-08-10 19:45:50 +10:00
Stuart Cook
4e9bf08937
Rollup merge of #145089 - Kobzol:bootstrap-cmd-error, r=jieyouxu
Improve error output when a command fails in bootstrap

I fixed this because it was being an issue for debugging CI failures.

We try to print as much information as possible, just with a slightly less verbose command description in non-verbose mode. The code is now more unified and hopefully simpler to understand.

I also fixed the `format_short_cmd` logic, it was a bit weird after some recent refactors.

Fixes: https://github.com/rust-lang/rust/issues/145002

r? `````````@jieyouxu`````````

CC `````````@Shourya742`````````
2025-08-10 19:45:49 +10:00
Stuart Cook
3d6976cba8
Rollup merge of #144739 - GuillaumeGomez:rustdoc-test-cleanup, r=fmease
Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc

Followup of rust-lang/rust#144297.
2025-08-10 19:45:48 +10:00
Stuart Cook
5955f005e5
Rollup merge of #144402 - heiher:stabilize-loong32-asm, r=Amanieu
Stabilize loongarch32 inline asm

r? ````````@Amanieu````````
2025-08-10 19:45:47 +10:00