36033 Commits

Author SHA1 Message Date
Shoyu Vanilla (Flint)
84e87d5bba
Merge pull request #20738 from jackh726/next-trait-solver-next4
Remove non-ns version of impl_self_ty and impl_trait
2025-09-25 10:30:54 +00:00
Shoyu Vanilla (Flint)
7ae5f2df12
Merge pull request #20735 from itsjunetime/fix_scip_salsa
fix SCIP panicking due to salsa not attaching
2025-09-25 10:30:12 +00:00
Laurențiu Nicola
c76e47e26f
Merge pull request #20740 from rust-lang/rustc-pull
Rustc pull update
2025-09-25 08:06:08 +00:00
Laurențiu Nicola
2e22e945a0 Install cargo for proc-macro-srv tests 2025-09-25 10:54:58 +03:00
Laurențiu Nicola
dc2096c25e Also install rustfmt on stable 2025-09-25 10:19:23 +03:00
The rustc-josh-sync Cronjob Bot
f69f3a6e01 Merge ref 'caccb4d0368b' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: caccb4d0368bd918ef6668af8e13834d07040417
Filtered ref: 0f345ed05d559bbfb754f1403b16199366cda2e0
Upstream diff: 21a19c297d...caccb4d036

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-25 04:16:26 +00:00
The rustc-josh-sync Cronjob Bot
8030da1ea6 Prepare for merging from rust-lang/rust
This updates the rust-version file to caccb4d0368bd918ef6668af8e13834d07040417.
2025-09-25 04:11:22 +00:00
itsjunetime
01b2eff275
fix SCIP panicking due to salsa not attaching 2025-09-24 18:47:36 -05:00
bors
0f345ed05d Auto merge of #146999 - matthiaskrgr:rollup-0gbkm82, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#146711 (fix 2 borrowck issues)
 - rust-lang/rust#146857 (revert change removing `has_infer` check. Commit conservatively patch…)
 - rust-lang/rust#146897 (fix ICE in rustdoc::invalid_html_tags)
 - rust-lang/rust#146915 (Make missed precondition-free float intrinsics safe)
 - rust-lang/rust#146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones)
 - rust-lang/rust#146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions)
 - rust-lang/rust#146964 (library: std: sys: pal: uefi: Add some comments)
 - rust-lang/rust#146969 (const-eval: better wording for errors involving maybe-null pointers)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-24 18:35:58 +00:00
Matthias Krüger
9c32980df6
Rollup merge of #146969 - RalfJung:maybe-null-errors, r=oli-obk
const-eval: better wording for errors involving maybe-null pointers

Fixes https://github.com/rust-lang/rust/issues/146748
r? ``@oli-obk``
2025-09-24 20:34:31 +02:00
Matthias Krüger
cc99b4561f
Rollup merge of #146964 - Ayush1325:close-protocol, r=joboet
library: std: sys: pal: uefi: Add some comments

I seemed to have forgotten that since I am using GET_PROTOCOL attribute for the std usecases, I did not need to close the protocols explicitly. So adding these comments as a note to future self not to waste time on the same thing again.
2025-09-24 20:34:31 +02:00
Matthias Krüger
5f397386b3
Rollup merge of #146959 - tshepang:patch-2, r=nnethercote
temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions

Also
- add Reference id
- fix typo
2025-09-24 20:34:29 +02:00
Matthias Krüger
4a79d99d1c
Rollup merge of #146932 - ShoyuVanilla:ra-in-tree-hack, r=lcnr
Switch next-solver related rustc dependencies of r-a to crates.io ones

r? ``@ghost``

cc ``@lnicola`` ``@lcnr``
2025-09-24 20:34:25 +02:00
Matthias Krüger
07b34d11a3
Rollup merge of #146711 - lcnr:fix-placeholder-ice, r=lqd
fix 2 borrowck issues

fixes https://github.com/rust-lang/rust/issues/146467 cc ``@amandasystems``

our understanding here is as follows: region constraints from computing implied bounds gets `ConstraintCategory::Internal`. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with only `ConstraintCategory::Internal` and `ConstraintCategory::OutlivesUnnameablePlaceholder(_)` constraints.

The path was something like
- `'placeholderU2: 'placeholderU1` (`Internal`)
- `'placeholderU1: 'static` (`OutlivesUnnameablePlaceholder('placeholderU2)`)

It's generally somewhat subtle here as ideally relating placeholders doesn't introduce `'static` constraints. Relating the placeholders themselves will always error regardless, cc https://github.com/rust-lang/rust/pull/142623.

---

separately fixes https://github.com/rust-lang/rust/pull/145925#issuecomment-3303733357 by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable 🤔 see the comments in `TypeChecker::check_promoted` cc ``@lqd``

r? lqd
2025-09-24 20:34:19 +02:00
Chayim Refael Friedman
bbb6459dc4
Merge pull request #20721 from ChayimFriedman2/fix-never
fix: Implement fallback properly
2025-09-24 18:16:15 +00:00
Chayim Refael Friedman
6b133c6b1b Implement fallback properly
fallback.rs was ported straight from rustc (minus the lint parts).

This fixes the `!` regressions.
2025-09-24 20:42:06 +03:00
Chayim Refael Friedman
993db83afd
Merge pull request #20683 from regexident/inference-result-types-iter
Expose iterators over an inference result's types
2025-09-24 17:12:33 +00:00
bors
529d6da73b Auto merge of #146338 - CrooseGit:dev/reucru01/AArch64-enable-GCS, r=Urgau,davidtwco
Extends AArch64 branch protection support to include GCS

Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
2025-09-24 13:04:19 +00:00
Shoyu Vanilla
fbfb2617ad Switch next-solver related rustc dependencies of r-a to crates.io ones 2025-09-24 21:28:50 +09:00
jackh726
6a458880fd Remove non-ns version of impl_self_ty and impl_trait 2025-09-24 05:45:12 +00:00
Shoyu Vanilla (Flint)
4d4a1dd464
Merge pull request #20733 from jackh726/next-trait-solver-next3
Convert more things from chalk to next solver
2025-09-24 04:52:28 +00:00
Jack Huey
7a6df720c4 Be sure to instantiate and pass up trait refs in named_associated_type_shorthand_candidates 2025-09-23 16:27:04 -04:00
Jack Huey
ea48563951 Remove all non-ns diagnostics queries, naming consistenly 2025-09-23 16:27:03 -04:00
Jack Huey
cc7c061e34 Use lower_nextsolver::callable_item_signature instead of lower::callable_item_signature 2025-09-23 16:26:46 -04:00
Shoyu Vanilla (Flint)
905641f352
Merge pull request #20543 from sgasho/fix/19443_replace_match_with_if_let
Fix "Replace match with if let" not to trigger when invalid transformations occur
nightly
2025-09-23 09:46:37 +00:00
Vincent Esche
7e9abceee7 Expose iterators over an inference result's types
(This re-introduces a reduced access to a couple of previously public fields on `InferenceResult`)
2025-09-23 11:39:40 +02:00
Jack Huey
73a401301d Remove lower::value_ty in favor of lower_nextsolver::value_ty 2025-09-23 03:58:51 -04:00
Jack Huey
3089d23710 Remove lower::ty in favor of lower_nextsolver::ty 2025-09-23 03:58:51 -04:00
Shoyu Vanilla (Flint)
f6cf3035c3
Merge pull request #20730 from A4-Tacks/migrate-expand-rest-pat
Migrate `expand_record_rest_pattern` assist to use `SyntaxEditor`
2025-09-23 07:05:22 +00:00
Shoyu Vanilla (Flint)
7804a2dd67
Merge pull request #20728 from jackh726/next-trait-solver-next2
Use ParamEnv in TraitEnvironment
2025-09-23 07:01:45 +00:00
A4-Tacks
258776b63a
Migrate expand_record_rest_pattern assist to use SyntaxEditor
Because `add_field` uses `ted`
2025-09-23 12:14:14 +08:00
Jack Huey
34f773f596 Use ParamEnv in TraitEnvironment 2025-09-23 00:04:57 +00:00
Jack Huey
c2513538cd Add 'db to TraitEnvironment 2025-09-23 00:04:57 +00:00
jackh726
7b9ad945ec Make Field::ty return TypeNs 2025-09-23 00:04:56 +00:00
jackh726
839645b4de Use ns versions of with_diagnostics queries 2025-09-22 21:50:12 +00:00
Shoyu Vanilla (Flint)
d05355db16
Merge pull request #20592 from A4-Tacks/add-braces-closure-in-match
Fix closure in match not applicable for add_braces
2025-09-22 15:51:12 +00:00
Shoyu Vanilla (Flint)
c1499a2381
Merge pull request #20679 from A4-Tacks/no-comp-ty-in-nested-pat
Fix complete type in nested pattern
2025-09-22 15:37:39 +00:00
Shoyu Vanilla (Flint)
d6e14cc457
Merge pull request #20722 from A4-Tacks/pull-assign-up-inner-if
Fix apply in inner if for pull_assignment_up
2025-09-22 15:31:10 +00:00
Shoyu Vanilla (Flint)
b465ae054a
Merge pull request #20723 from A4-Tacks/fix-bind-unused-applicable-underscore
Fix applicable on underscore for bind_unused_param
2025-09-22 15:29:47 +00:00
Shoyu Vanilla (Flint)
3249fc76b2
Merge pull request #20725 from ChayimFriedman2/fix-missing-lifetime
fix: Fix lifetime elision handling for `Fn`-style trait bounds
2025-09-22 15:21:19 +00:00
Chayim Refael Friedman
7d9af9f6a5
Merge pull request #20717 from ShoyuVanilla/migrate-more
internal: Migrate more predicate things to next-solver
2025-09-22 14:55:32 +00:00
Shoyu Vanilla
0a5457a392 internal: Migrate more predicate things to next-solver 2025-09-22 23:44:50 +09:00
bors
26cc777962 Auto merge of #146683 - clarfonthey:safe-intrinsics, r=RalfJung,Amanieu
Mark float intrinsics with no preconditions as safe

Note: for ease of reviewing, the list of safe intrinsics is sorted in the first commit, and then safe intrinsics are added in the second commit.

All *recently added* float intrinsics have been correctly marked as safe to call due to the fact that they have no preconditions. This adds the remaining float intrinsics which are safe to call to the safe intrinsic list, and removes the unsafe blocks around their calls.

---

Side note: this may want a try run before being added to the queue, since I'm not sure if there's any tier-2 code that uses these intrinsics that might not be tested on the usual PR flow. We've already uncovered a few places in subtrees that do this, and it's worth double-checking before clogging up the queue.
2025-09-22 14:35:46 +00:00
Chayim Refael Friedman
ad9422da1a Fix lifetime elision handling for Fn-style trait bounds
Two fixes were needed:

 1. Previously, we enabled elision for the generic args of `Fn` itself, instead of for generic args of paths within it.
 2. In lowering in the new solver the `Output` parameter did not have elision set correctly, I don't know why. In the old lowering it was done correctly.
2025-09-22 16:53:20 +03:00
Chayim Refael Friedman
83981c14aa
Merge pull request #20724 from ChayimFriedman2/ns-cleanup3
minor: Another regression test for next solver fixed bug
2025-09-22 07:36:56 +00:00
Chayim Refael Friedman
d5f597e726 Another regression test for next solver fixed bug 2025-09-22 10:26:03 +03:00
A4-Tacks
fef1ab5d71
Fix applicable on underscore for bind_unused_param
Fixes:
- applicable on underscore prefix parameter
- using binding mode as an expression

Examples
---
```rust
fn foo($0_x: i32, y: i32) {}
```

**Before this PR**:

```rust
fn foo(_x: i32, y: i32) {
    let _ = _x;
}
```

**After this PR**:

Assist not applicable

---

```rust
fn foo(ref $0y: i32) {}
```

**Before this PR**:

```rust
fn foo(ref y: i32) {
    let _ = ref y;
}
```

**After this PR**:

```rust
fn foo(ref y: i32) {
    let _ = y;
}
```
2025-09-22 15:13:13 +08:00
A4-Tacks
23535a6646
Fix apply in internal if for pull_assignment_up
Example
---
```rust
fn foo() {
    let mut a = 1;

    if true {
        a = 2;
    } else if true {
        $0a = 3;
    } else {
        a = 4;
    }
}
```

**Before this PR**:

```rust
fn foo() {
    let mut a = 1;

    if true {
        a = 2;
    } else a = if true {
        3
    } else {
        4
    };
}
```

**After this PR**:

```rust
fn foo() {
    let mut a = 1;

    a = if true {
        2
    } else if true {
        3
    } else {
        4
    };
}
```
2025-09-22 14:32:46 +08:00
Chayim Refael Friedman
f41f762a80
Merge pull request #20718 from ChayimFriedman2/inlay-max-len-docs
minor: Clarify `rust-analyzer.inlayHints.maxLength` is not a hard guarantee
2025-09-22 01:27:15 +00:00
Chayim Refael Friedman
129d9f7af6 Clarify rust-analyzer.inlayHints.maxLength is not a hard guarantee 2025-09-22 04:16:50 +03:00