37522 Commits

Author SHA1 Message Date
Laurențiu Nicola
51d133b75f
Merge pull request #21331 from rust-lang/rustc-pull
minor: Rustc pull update
2025-12-25 06:00:15 +00:00
The rustc-josh-sync Cronjob Bot
958d68ccd2 Merge ref 'e7d44143a12a' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: e7d44143a12a526488e4f0c0d7ea8e62a4fe9354
Filtered ref: fe2cf3fa56a4ce08f56aee660fbe289c7d13dede
Upstream diff: f41f40408d...e7d44143a1

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-25 04:19:28 +00:00
The rustc-josh-sync Cronjob Bot
314785513e Prepare for merging from rust-lang/rust
This updates the rust-version file to e7d44143a12a526488e4f0c0d7ea8e62a4fe9354.
2025-12-25 04:19:22 +00:00
bors
fe2cf3fa56 Auto merge of #150283 - Urgau:remap-debuginfo-absolute, r=jieyouxu
Remap both absolute and relative paths when building `rustc` and `std`

Turns out [#150110](https://github.com/rust-lang/rust/issues/150110) didn't work as expected, because when the standard library sources are present, we [helpfully un-remap the paths](e951f470d7/compiler/rustc_metadata/src/rmeta/decoder.rs (L1656-L1702)) to the local directory of the user, including when we are building the compiler and standard library it-self (duh!), and since those paths are absolute (not relative), our purely relative remapping didn't pick them up.

This behavior wasn't a issue before because the un-remap logic immediately tries to remap them again, and since we had the absolute remapping we would just remap them to the the same thing.

To fix that issue I've adjusted our remapping to remap both the absolute and relative paths when building `rustc` and `std`, as well as added a run-make to make sure we don't regress it again (with a new `needs-std-remap-debuginfo` directive).

r? `@jieyouxu`
2025-12-24 06:23:00 +00:00
Laurențiu Nicola
be7d98ab08
Merge pull request #21327 from ada4a/patch-1
Fix typo in a URL
2025-12-23 20:31:49 +00:00
Ada Alakbarova
6cfdce929b
Fix typo in a URL 2025-12-23 21:20:11 +01:00
Shoyu Vanilla (Flint)
e14db0f5f8
Merge pull request #21326 from Veykril/push-vzswtlulupxv
fix: Fix flycheck generations not being synced for multiple workspaces
2025-12-23 13:41:33 +00:00
Lukas Wirth
d63914222e fix: Fix flycheck generations not being synced for multiple workspaces
The diagnostics collection globally tracks the generation for all loaded workspaces as its shared between them, yet the flycheck actors track their own separate generations per workspace.
This mismatch could cause flycheck to not work correctly when multiple workspaces were loaded.
2025-12-23 13:57:06 +01:00
bors
41271940aa Auto merge of #150291 - alexcrichton:wasi-use-usleep, r=ChrisDenton
std: Use `usleep` temporarily on WASI targets

This fixes some fallout from rust-lang/rust#147572 where the `thread::sleep` function is is broken on `wasm32-wasip2` after that PR. The cause for this is a broken implementation of `nanosleep` in wasi-libc itself which is being fixed in WebAssembly/wasi-libc#696. Similar to rust-lang/rust#149864 this avoids the problematic function for now while the wasi-libc changes take some time to propagate into a wasi-sdk release.

Closes rust-lang/rust#150290
2025-12-23 06:26:53 +00:00
bors
036a966d9b Auto merge of #150133 - ZuseZ4:enzyme-frontend-nightly, r=jieyouxu
remove llvm_enzyme and enzyme fallbacks from most places

Using dlopen to get symbols has the nice benefit that rustc itself doesn't depend on libenzyme symbols anymore. We can therefore delete most fallback implementations in the backend (independently of whether we enable enzyme or not). When trying to use autodiff on nightly, we will now fail with a nice error if and only if we fail to load libEnzyme-21.so in our backend.

Verified:
Build as nightly, without Enzyme
Build as nightly, with Enzyme
Build as stable (without Enzyme)

With this PR we will now run `tests/ui/autodiff` on nightly, the tests are passing.

r? `@kobzol`
2025-12-23 02:49:04 +00:00
bors
0dae47933d Auto merge of #150217 - notriddle:stringdex-0.0.4, r=yotamofek,GuillaumeGomez
rustdoc: upgrade to stringdex 0.0.4

- code cleanup
- smaller encoding for runs
- fast path for the common encoding case
2025-12-22 23:19:14 +00:00
bors
85f5182a02 Auto merge of #150284 - JonathanBrouwer:rollup-yeibc0p, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#149928 (Detail expectation on non-`()` block tail in `if` then condition with no `else`)
 - rust-lang/rust#150166 (Don't lint on interior mutable `const` item coming from derefs)
 - rust-lang/rust#150281 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-22 20:09:56 +00:00
bors
f07c54e547 Auto merge of #150277 - JonathanBrouwer:rollup-gvmdw36, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#150098 (remove `legacy_const_generic_args` cache)
 - rust-lang/rust#150155 (fix ICE when {{root}} appears in import suggestions)
 - rust-lang/rust#150267 (`rust-analyzer` subtree update)
 - rust-lang/rust#150274 (Fix typo)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-22 17:03:07 +00:00
Jonathan Brouwer
90ba183984
Rollup merge of #150274 - ada4a:patch-4, r=Kivooeo
Fix typo
2025-12-22 17:33:38 +01:00
Jonathan Brouwer
f2e76266df
Rollup merge of #150267 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 31d2019672.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-22 17:33:37 +01:00
Jonathan Brouwer
f46d635fb5
Rollup merge of #150155 - Aditya-PS-05:fix/ice-150103-root-in-suggestions, r=estebank
fix ICE when {{root}} appears in import suggestions

Fixes rust-lang/rust#150103

When wrong nested imports like `use A::{::Fish}` were used, the internal {{root}} would appear in diagnostic suggestions, causing an ICE in `join_path_idents` which asserted that **{{root}} should only appear at the start of a path**.

r? ``@matthiaskrgr``
2025-12-22 17:33:37 +01:00
Jonathan Brouwer
a464c104e9
Rollup merge of #150098 - Bryntet:perf-testing, r=JonathanBrouwer
remove `legacy_const_generic_args` cache

putting this here to run perf
2025-12-22 17:33:36 +01:00
Laurențiu Nicola
ea18787e9c Fix name collision warning 2025-12-22 16:44:06 +02:00
Laurențiu Nicola
624761a864
Merge pull request #21318 from rust-lang/rustc-pull
minor: Rustc pull update
2025-12-22 13:49:55 +00:00
Lukas Wirth
31d2019672
Merge pull request #20521 from A4-Tacks/suggest-break-expr
Add BreakExpr completion suggest
2025-12-22 12:36:29 +00:00
A4-Tacks
ac01f880d7
Add BreakExpr completion suggest
- Move `ide::goto_definition::find_loops`
  into `ide_db::syntax_helpers::node_ext::find_loops`
2025-12-22 20:13:56 +08:00
Lukas Wirth
d1a3407ff8
Merge pull request #20595 from A4-Tacks/conv-iter-for-to-for-indent
Fix indent for convert_iter_for_each_to_for
2025-12-22 07:51:03 +00:00
bors
f562c1eb3d Auto merge of #148766 - cjgillot:mir-const-runtime-checks, r=RalfJung,saethlin
Replace Rvalue::NullaryOp by a variant in mir::Operand.

Based on https://github.com/rust-lang/rust/pull/148151

This PR fully removes the MIR `Rvalue::NullaryOp`. After rust-lang/rust#148151, it was only useful for runtime checks like `ub_checks`, `contract_checks` and `overflow_checks`.

These are "runtime" checks, boolean constants that may only be `true` in codegen. It depends on a rustc flag passed to codegen, so we need to represent those flags cross-crate.

This PR replaces those runtime checks by special variants in MIR `ConstValue`. This allows code that expects constants to manipulate those as such, even if we may not always be able to evaluate them to actual scalars.
2025-12-22 06:58:28 +00:00
A4-Tacks
d6a1e31373
Fix indent for convert_iter_for_each_to_for
Example
---
```rust
fn main() {
    {
        let it = core::iter::repeat(92);
        it.$0for_each(|param| match param {
            (x, y) => println!("x: {}, y: {}", x, y),
        });
    }
}
```

**Before this PR**:

```rust
fn main() {
    {
        let it = core::iter::repeat(92);
        for param in it {
            match param {
                    (x, y) => println!("x: {}, y: {}", x, y),
                }
        }
    }
}
```

**After this PR**:

```rust
fn main() {
    {
        let it = core::iter::repeat(92);
        for param in it {
            match param {
                (x, y) => println!("x: {}, y: {}", x, y),
            }
        }
    }
}
```
2025-12-22 14:47:27 +08:00
The rustc-josh-sync Cronjob Bot
0a5311af4d Merge ref 'f41f40408d71' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: f41f40408d719aa9ae0c6bfa17619d8f3f9e5b99
Filtered ref: 5abf37848786e70eb8136f43225b3470afea6dea
Upstream diff: 0208ee09be...f41f40408d

This merge was created using https://github.com/rust-lang/josh-sync.
2025-12-22 04:21:56 +00:00
The rustc-josh-sync Cronjob Bot
f511edf992 Prepare for merging from rust-lang/rust
This updates the rust-version file to f41f40408d719aa9ae0c6bfa17619d8f3f9e5b99.
2025-12-22 04:21:46 +00:00
Lukas Wirth
9d58a93602
Merge pull request #20439 from A4-Tacks/t-macro-bracket-doc
Add guess braces doc `T![]` for `T_`
2025-12-22
2025-12-21 14:19:06 +00:00
Lukas Wirth
14cc41f2ba
Merge pull request #20438 from A4-Tacks/fix-guess-renamed-macro-braces
Fix guess renamed macro braces
2025-12-21 14:18:55 +00:00
Lukas Wirth
47037adcac
Merge pull request #20577 from A4-Tacks/nested-if-indent
Fix indent for merge_nested_if
2025-12-21 14:03:50 +00:00
Lukas Wirth
ee9783825a
Merge pull request #20576 from A4-Tacks/nested-if-let
Fix nested if-let for merge_nested_if
2025-12-21 14:03:26 +00:00
Lukas Wirth
09a64600fb
Merge pull request #20472 from BenjaminBrienen/remove-style-point
Remove conflicting advice
2025-12-21 14:02:48 +00:00
Lukas Wirth
5b9198d11f
Merge pull request #20597 from A4-Tacks/conv-to-guarded-ret-doc
Add LetStmt doc for convert_to_guarded_return
2025-12-21 14:02:06 +00:00
Lukas Wirth
3aecf081f6
Merge pull request #20996 from A4-Tacks/explicit-dot-call-deref
Add ide-assist: add_explicit_method_call_deref
2025-12-21 13:50:43 +00:00
Lukas Wirth
10418b49d0
Merge pull request #21316 from Veykril/push-rsxnznymvluw
Call out feature freeze on IDE assists
2025-12-21 13:28:45 +00:00
Lukas Wirth
1a420f5153 Call out feature freeze on IDE assists 2025-12-21 14:11:48 +01:00
Lukas Wirth
82d4f8bacd
Merge pull request #21304 from asukaminato0721/19168
internal: Improve recursive mbe parsing behavior
2025-12-21 12:39:05 +00:00
Lukas Wirth
7fdd04bdb3
Merge pull request #21314 from Veykril/push-kywtpqlnwztr
Add 'Use of AI tools' section to CONTRIBUTING.md
2025-12-21 12:35:00 +00:00
Lukas Wirth
80e10c0ea0 Add 'Use of AI tools' section to CONTRIBUTING.md 2025-12-21 13:26:07 +01:00
bors
5abf378487 Auto merge of #149437 - ilammy:patch-1, r=Mark-Simulacrum
Fix trailing newline in JUnit formatter

`write_message()` expects messages to contain no newlines.

Fixes https://github.com/rust-lang/rust/issues/149436
2025-12-21 10:37:51 +00:00
Chayim Refael Friedman
ccb2ffe653
Merge pull request #21311 from A4-Tacks/serde-derive-feature
internal: Fix hir-ty implicit serde derive feature
2025-12-21 07:42:18 +00:00
A4-Tacks
5abec3c2ce
internal: Fix hir-ty implicit serde derive feature
bad commit: 0dd3fe029a532c6c5fa3b0bdd7c4eb57843bb156
cwd: crates/hir-ty
cmd: cargo check
output: error: cannot find derive macro `Serialize` in this scope
2025-12-21 15:30:47 +08:00
Chayim Refael Friedman
8f28e82a4f
Merge pull request #21212 from A4-Tacks/comp-try-let-default-varname
Add default varname for TryEnum postfix completion
2025-12-21 06:13:23 +00:00
A4-Tacks
847317ccba
Add default varname for TryEnum postfix completion
Example
---
```rust
fn main() {
    let bar = Some(true);
    bar.i$0
}
```

**Before this PR**

```rust
fn main() {
    let bar = Some(true);
    if let Some($1) = bar {
        $0
    }
}
```

**After this PR**

```rust
fn main() {
    let bar = Some(true);
    if let Some(${1:bar}) = bar {
        $0
    }
}
```
2025-12-21 13:55:21 +08:00
Chayim Refael Friedman
961fd33e8e
Merge pull request #21310 from ChayimFriedman2/remove-attach-db
minor: Remove some redundant `attach_db()`s
2025-12-21 05:53:58 +00:00
Chayim Refael Friedman
b5fbcc6917
Merge pull request #21166 from A4-Tacks/fly-closure-this-param
Support undotted-self for `this` param closure
2025-12-21 05:37:24 +00:00
Chayim Refael Friedman
65c14db957 Remove some redundant attach_db()s 2025-12-21 07:10:19 +02:00
Chayim Refael Friedman
cbc18ae50c
Merge pull request #21289 from A4-Tacks/add-ref-matched-type
Complete reference `&T` -> `&&T`
2025-12-21 05:08:04 +00:00
Chayim Refael Friedman
3d25bbf964
Merge pull request #21291 from A4-Tacks/expected-nested-match-arm-expr-ty
Fix match arm nested body invalid expected type
2025-12-21 05:04:56 +00:00
A4-Tacks
f8f69b2a61
Complete reference &T -> &&T
Example
---
```rust
struct S;
fn foo(s: &&S) {}
fn main() {
    let mut ssss = &S;
    foo($0);
}
```

**Before this PR**

```rust
st S S []
lc ssss &S [local]
st S S []
fn foo(…) fn(&&S) []
fn main() fn() []
```

**After this PR**

```rust
st S S []
lc ssss &S [local]
lc &ssss [type+local]
st S S []
fn foo(…) fn(&&S) []
fn main() fn() []
```
2025-12-21 12:58:12 +08:00
A4-Tacks
f0055f6557
Add parent_match method to node_ext 2025-12-21 12:54:47 +08:00