Commit graph

36089 commits

Author SHA1 Message Date
Shoyu Vanilla (Flint)
062ac7a545
Merge pull request #20760 from A4-Tacks/all-any-not-attr-comp
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Add `all` `any` and `not` attribute completions
2025-09-29 08:33:17 +00:00
Laurențiu Nicola
4042662c80
Merge pull request #20761 from rust-lang/rustc-pull
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Rustc pull update
2025-09-29 04:29:28 +00:00
The rustc-josh-sync Cronjob Bot
253554e554 Merge ref 'f957826bff7a' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: f957826bff7a68b267ce75b1ea56352aed0cca0a
Filtered ref: 7291893f9d
Upstream diff: caccb4d036...f957826bff

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-29 04:07:50 +00:00
The rustc-josh-sync Cronjob Bot
fa0421c2da Prepare for merging from rust-lang/rust
This updates the rust-version file to f957826bff7a68b267ce75b1ea56352aed0cca0a.
2025-09-29 04:07:42 +00:00
bors
7291893f9d Auto merge of #147002 - notriddle:stringdex3, r=GuillaumeGomez
rustdoc-search: stringdex update with more packing

Before:

    18M  build/x86_64-unknown-linux-gnu/doc/search.index/
    57M  build/x86_64-unknown-linux-gnu/compiler-doc/search.index/

After:

    16M  build/x86_64-unknown-linux-gnu/doc/search.index/
    49M  build/x86_64-unknown-linux-gnu/compiler-doc/search.index/

CC rust-lang/rust#146063
2025-09-28 13:29:26 +00:00
Lukas Wirth
5c0b555a65
Merge pull request #19867 from Kivooeo/unsafegate
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Allow `&raw [mut | const]` for union field
2025-09-28 11:54:24 +00:00
bors
b98660cf42 Auto merge of #147045 - notriddle:search-index-entrydata-path, r=GuillaumeGomez
rustdoc-search: use the same ID for entry and path to same item

This decreases the size of the compiler-doc from 57MiB to 56MiB.

r? `@GuillaumeGomez`
2025-09-28 07:13:23 +00:00
bors
6876493b34 Auto merge of #147042 - Noratrieb:untrack-caller-vec, r=tgross35
Remove most `#[track_caller]` from allocating Vec methods

They cause significant binary size overhead while contributing little value.

closes rust-lang/rust#146963, see that issue for more details.
2025-09-28 03:23:45 +00:00
A4-Tacks
6bb1b88677
Add all any and not attribute completions
Example
---
`#[cfg($0)]` -> `#[cfg(any($0))]`
2025-09-28 08:42:18 +08:00
bors
b9baa60c38 Auto merge of #146927 - Kobzol:install-clif, r=jieyouxu
Make it possible to `x install` Cranelift and LLVM bitcode linker

It was not possible to install these before, as they were not in the install step description list.

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

r? `@jieyouxu`
2025-09-27 19:26:29 +00:00
bors
4b3b444e2e Auto merge of #146829 - cjgillot:jump-threading-loop-dominator, r=dianqk
JumpThreading: Avoid computing dominators to identify loop headers.

JumpThreading tries to avoid threading through loop headers to avoid creating irreducible CFGs.

However, computing dominators is expensive, and accounts up to 20 % of the runtime of the JumpThreading pass for some cases like serde.

This PR proposes to approximate according to the post-order traversal order. We define a "maybe" loop header as a block which is visited after its predecessor in post-order.
2025-09-27 09:32:40 +00:00
bors
97fb5fc4ed Auto merge of #146636 - Mark-Simulacrum:bootstrap-bump, r=jieyouxu
Bump bootstrap compiler to 1.91 beta

https://forge.rust-lang.org/release/process.html#default-branch-bootstrap-update-tuesday
2025-09-27 03:50:03 +00:00
bors
0d1311a5c4 Auto merge of #147074 - matthiaskrgr:rollup-sm3owsd, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#145113 (resolve: Do not finalize shadowed bindings)
 - rust-lang/rust#146523 (Demote both armebv7r-none-* targets.)
 - rust-lang/rust#146704 (port `#[debugger_visualizer]` to the new attribute system)
 - rust-lang/rust#146758 (Stop linking rs{begin,end} objects on x86_64-*-windows-gnu)
 - rust-lang/rust#146778 (Use standard attribute logic for allocator shim)
 - rust-lang/rust#146849 (Reduce some uses of `LegacyBang`)
 - rust-lang/rust#147016 (fix doc comments to be more standard)
 - rust-lang/rust#147027 (Add new `tyalias` intra-doc link disambiguator)
 - rust-lang/rust#147031 (mbe: Simplify check_redundant_vis_repetition)
 - rust-lang/rust#147058 (Ignore more failing ui tests for GCC backend)

Failed merges:

 - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-27 00:44:47 +00:00
Laurențiu Nicola
f5e049d09d
Merge pull request #20753 from rust-lang/dependabot/npm_and_yarn/editors/code/tar-fs-2.1.4
Some checks failed
metrics / build_metrics (push) Has been cancelled
rustdoc / rustdoc (push) Has been cancelled
metrics / other_metrics (diesel-1.4.8) (push) Has been cancelled
metrics / other_metrics (hyper-0.14.18) (push) Has been cancelled
metrics / other_metrics (ripgrep-13.0.0) (push) Has been cancelled
metrics / other_metrics (self) (push) Has been cancelled
metrics / other_metrics (webrender-2022) (push) Has been cancelled
metrics / generate_final_metrics (push) Has been cancelled
minor: Bump tar-fs from 2.1.3 to 2.1.4 in /editors/code
2025-09-26 20:21:50 +00:00
dependabot[bot]
3deacd158d
Bump tar-fs from 2.1.3 to 2.1.4 in /editors/code
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.3 to 2.1.4.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.3...v2.1.4)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 2.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-26 19:45:06 +00:00
Laurențiu Nicola
3bc27db03b
Merge pull request #20751 from neuschaefer/memchr
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Update memchr to 2.7.6
2025-09-26 16:25:41 +00:00
Matthias Krüger
57c297a30f
Rollup merge of #147058 - GuillaumeGomez:ignore-more-ui-tests, r=Kobzol
Ignore more failing ui tests for GCC backend

Needed for https://github.com/rust-lang/rust/pull/146414.

r? ``@Kobzol``
2025-09-26 18:11:15 +02:00
Matthias Krüger
114bcdd340
Rollup merge of #147031 - joshtriplett:mbe-opt-collect, r=lcnr
mbe: Simplify check_redundant_vis_repetition

Eliminate a use of `map_or` in favor of a match.

Inline some variable definitions that don't add clarity, and that
prevent short-circuiting.
2025-09-26 18:11:14 +02:00
Matthias Krüger
f22620ab7e
Rollup merge of #147027 - GuillaumeGomez:tyalias-disambiguator, r=lolbinarycat
Add new `tyalias` intra-doc link disambiguator

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

Alternative to rust-lang/rust#146866.

This adds support for a new disambiguator: `tyalias`. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them.

cc ``@fmease``
r? lolbinarycat
2025-09-26 18:11:13 +02:00
Matthias Krüger
8ae1783bf0
Rollup merge of #147016 - hkBst:whitespace-1, r=nnethercote
fix doc comments to be more standard
2025-09-26 18:11:12 +02:00
Matthias Krüger
b7bc6dfdc1
Rollup merge of #146849 - joshtriplett:macro-reduce-legacy-bang, r=petrochenkov
Reduce some uses of `LegacyBang`

- **Switch `dummy_bang` from `LegacyBang` to `Bang`**
- **mbe: Switch dummy extension used for errors from `LegacyBang` to `Bang`**
2025-09-26 18:11:12 +02:00
Matthias Krüger
7b730a3780
Rollup merge of #146778 - nikic:allocator-shim-attributes, r=jackh726
Use standard attribute logic for allocator shim

Use llfn_attrs_from_instance() to generate the attributes for the allocator shim. This ensures that we generate all the usual attributes (and don't get to find out one-by-one that a certain attribute is important for a certain target). Additionally this will enable emitting the allocator-specific attributes (not included here).

This change is quite awkward because the allocator shim uses SimpleCx, while llfn_attrs_from_instance uses CodegenCx. I've switched it to use SimpleCx plus tcx/sess arguments where necessary. If there's a simpler way to do this, I'd love to know about it...
2025-09-26 18:11:11 +02:00
Matthias Krüger
e0f06b77c0
Rollup merge of #146758 - mati865:amd64_mingw_no_rs_objects, r=petrochenkov
Stop linking rs{begin,end} objects on x86_64-*-windows-gnu

Until now, x86_64-pc-windows-gnu linked `rsbegin.o` and `rsend.o` just like i686-pc-windows-gnu, even though they were no-ops for it. This was likely done for the simplicity back when it was introduced.
Today the things are different and these startup/end objects harm other features, like `build-std`. Given the demotion of i686-pc-windows-gnu from tier 1, there is no point in hurting x86_64-pc-windows-gnu, which remains a tier 1.

The files are still shipped in case downstream crates expect them, as in case of the unmaintained `xargo`.

Fixes https://github.com/rust-lang/rust/issues/146739
2025-09-26 18:11:10 +02:00
Matthias Krüger
4852229a82
Rollup merge of #146704 - jdonszelmann:port-debug-visualizer, r=petrochenkov
port `#[debugger_visualizer]` to the new attribute system
2025-09-26 18:11:09 +02:00
Matthias Krüger
bb23265843
Rollup merge of #146523 - thejpster:demote-armebv7r-targets, r=jackh726
Demote both armebv7r-none-* targets.

OK, slightly more controversial than https://github.com/rust-lang/rust/pull/146520 and https://github.com/rust-lang/rust/pull/146522  - I'd like to drop the bare-metal **big-endian** Armv7-R targets down to Tier 3.

The reason is simple - we cannot test them in https://github.com/rust-embedded/cortex-ar/. This because QEMU support for Big Endian Armv7-R is broken. I tried quite hard, but all the strings I printed with semihosting came out byte swapped (or "etybawa depp") because of how QEMU kludges the access to memory in big-endian mode.

The target also has only a single maintainer. Although, if ````@chrisnc```` wants to put up a case for keeping it at Tier 2 though, I'm happy to hear it!

This PR wil be rebased once https://github.com/rust-lang/rust/pull/146419 completes the queue.
2025-09-26 18:11:09 +02:00
Matthias Krüger
21c3fe85d6
Rollup merge of #145113 - petrochenkov:lessfinalize, r=lcnr
resolve: Do not finalize shadowed bindings

I.e. do not mark them as used, or non-speculatively loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-26 18:11:08 +02:00
J. Neuschäfer
87d9dee92f Update memchr to 2.7.6
memchr 2.7.6 contains a bugfix for aarch64_be
2025-09-26 17:48:20 +02:00
bors
f21aef7524 Auto merge of #146595 - Shourya742:make-cargo-test-work-for-self-test, r=Kobzol
Make cargo test work for  bootstrap self test

This PR enables the bootstrap self-test to run via cargo test. I have removed the detect_src_and_out test for now, but it will be reintroduced in a follow-up PR where all bootstrap tests will be migrated to use testCtx.

r? `@Kobzol`

try-job: aarch64-apple
2025-09-26 12:55:15 +00:00
Shoyu Vanilla (Flint)
a56e57752f
Merge pull request #20748 from A4-Tacks/migrate-arith-op-prec
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Migrate `replace_arith_op` assist to use `SyntaxEditor`
2025-09-26 09:05:59 +00:00
Shoyu Vanilla (Flint)
62809824ad
Merge pull request #20599 from A4-Tacks/bang-de-morgan
Add applicable on bang `!` for apply_demorgan
2025-09-26 08:58:07 +00:00
A4-Tacks
918d3b8175
Migrate replace_arith_op assist to use SyntaxEditor 2025-09-26 16:54:47 +08:00
Shoyu Vanilla (Flint)
6135c07683
Merge pull request #20611 from A4-Tacks/replace-arith-op-prec
Fix precedence parenthesis for replace_arith_op
2025-09-26 08:30:46 +00:00
Shoyu Vanilla (Flint)
084c1e537d
Merge pull request #20604 from A4-Tacks/cfg-attr-comp
Add cfg_attr predicate completion
2025-09-26 08:10:25 +00:00
Shoyu Vanilla (Flint)
a55e2b578c
Merge pull request #20729 from A4-Tacks/const-param-kwd
Add const parameter keyword completion
2025-09-26 07:00:52 +00:00
Shoyu Vanilla (Flint)
e81202c919
Merge pull request #20731 from A4-Tacks/expand-rest-pat-in-tuple-slice-pat
Fix expand rest pattern in tuple and slice pattern
2025-09-26 06:54:30 +00:00
A4-Tacks
6d85fd739f
Fix expand rest pattern in tuple and slice pattern
Assist: expand_tuple_rest_pattern

Fills fields by replacing rest pattern in tuple patterns.

Example
---
```
fn foo(bar: (char, i32, i32)) {
    let (ch, ..$0) = bar;
}
```
->
```
fn foo(bar: (char, i32, i32)) {
    let (ch, _1, _2) = bar;
}
```

---

Assist: expand_slice_rest_pattern

Fills fields by replacing rest pattern in slice patterns.

Example
---
```
fn foo(bar: [i32; 3]) {
    let [first, ..$0] = bar;
}
```
->
```
fn foo(bar: [i32; 3]) {
    let [first, _1, _2] = bar;
}
```
2025-09-26 14:44:05 +08:00
Shoyu Vanilla (Flint)
997f3ec544
Merge pull request #20598 from A4-Tacks/let-chain-sup-conv-to-guarded-ret
Add let-chain support for convert_to_guarded_return
2025-09-26 06:42:10 +00:00
Shoyu Vanilla (Flint)
a96d92e9e9
Merge pull request #20736 from A4-Tacks/fix-invert-if-let-chain
Fix applicable on if-let-chain for invert_if
2025-09-26 05:36:52 +00:00
Shoyu Vanilla (Flint)
750d566106
Merge pull request #20742 from A4-Tacks/unused-raw-var
Fix fixes for unused raw variables
2025-09-26 05:25:09 +00:00
bors
c7284d77fa Auto merge of #145882 - m-ou-se:format-args-extend-1-arg, r=petrochenkov
Extended temporary argument to format_args!() in all cases

Fixes https://github.com/rust-lang/rust/issues/145880 by removing the special case.
2025-09-26 04:34:09 +00:00
bors
a97637f074 Auto merge of #146919 - lcnr:yeet-fast-path, r=fee1-dead
remove incorrect fast path

Using `tcx.is_copy_modulo_regions` drops information from the current `typing_env`. Writing a regression test for this is really hard. We need to prove `Copy` of something that doesn't directly reference a coroutine or an opaque, but does so indirectly.

cc rust-lang/rust#146813.
2025-09-25 23:50:40 +00:00
Vadim Petrochenkov
26a9dacc14 resolve: Do not finalize shadowed bindings
I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-09-25 20:36:14 +03:00
bors
508ff8a8a8 Auto merge of #146697 - cjgillot:invalidate-patch, r=lcnr
Avoid invalidating CFG caches from MirPatch::apply.

Small effort to reduce invalidating CFG caches.
2025-09-25 17:19:29 +00:00
A4-Tacks
3964af7bf6
Add applicable in closure for convert_to_guarded_return
Example
---
```rust
fn main() {
    let _f = || {
        bar();
        if$0 true {
            foo();

            // comment
            bar();
        }
    }
}
```
->
```rust
fn main() {
    let _f = || {
        bar();
        if false {
            return;
        }
        foo();

        // comment
        bar();
    }
}
```
2025-09-25 22:04:53 +08:00
A4-Tacks
4e3b6b38dd
Fix not applicable for if-expr in let-stmt
Example
---
```rust
fn main() {
    let _x = loop {
        if$0 let Ok(x) = Err(92) {
            foo(x);
        }
    };
}
```

**Before**:

Assist not applicable

**After**:

```rust
fn main() {
    let _x = loop {
        let Ok(x) = Err(92) else { continue };
        foo(x);
    };
}
```
2025-09-25 22:00:56 +08:00
A4-Tacks
a98da9f795
Add let-chain support for convert_to_guarded_return
- And add early expression `None` in function `Option` return

Example
---
```rust
fn main() {
    if$0 let Ok(x) = Err(92)
        && x < 30
        && let Some(y) = Some(8)
    {
        foo(x, y);
    }
}
```
->
```rust
fn main() {
    let Ok(x) = Err(92) else { return };
    if x >= 30 {
        return;
    }
    let Some(y) = Some(8) else { return };
    foo(x, y);
}
```
2025-09-25 21:04:48 +08:00
A4-Tacks
4353624cc0
Fix fixes for unused raw variables
Example
---
```
fn main() {
    let $0r#type = 2;
}
```

**Before this PR**:

```rust
fn main() {
    let _r#type = 2;
}
```

**After this PR**:

```rust
fn main() {
    let _type = 2;
}
```
2025-09-25 19:58:45 +08:00
Shoyu Vanilla (Flint)
84e87d5bba
Merge pull request #20738 from jackh726/next-trait-solver-next4
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Remove non-ns version of impl_self_ty and impl_trait
2025-09-25 10:30:54 +00:00
bors
af56430500 Auto merge of #147003 - matthiaskrgr:rollup-b5z9uiz, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#146556 (Fix duration_since panic on unix when std is built with integer overflow checks)
 - rust-lang/rust#146679 (Clarify Display for error should not include source)
 - rust-lang/rust#146753 (Improve the pretty print of UnstableFeature clause)
 - rust-lang/rust#146894 (Improve derive suggestion of const param)
 - rust-lang/rust#146950 (core: simplify `CStr::default()`)
 - rust-lang/rust#146958 (Fix infinite recursion in Path::eq with String)
 - rust-lang/rust#146971 (fix ICE in writeback due to bound regions)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 10:30:50 +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