Commit Graph

336987 Commits

Author SHA1 Message Date
Robert Bastian
80dc5df240 Update icu_list to 2.3 2026-09-01 13:45:58 +02:00
bors
cda599c55f Auto merge of #161151 - jackh726:issue-160669-subtyping-live, r=lqd
Treat vars created for opaque subtyping as live everywhere

Fixes rust-lang/rust#160669

r? lqd

Let's look at a minimal variant of rust-lang/rust#160669

```rust
fn minimal(short: (), out: &'static ()) -> impl Sized {
    if true {
        return &short; //~ ERROR `short` does not live long enough
    }
    out
}
```

That has the following (simplified) MIR:

```rust
fn foo(_1: (), _2: &'?4 ()) -> Opaque(DefId(foo::{opaque#0}), []) {
    bb0: { switchInt(move _4) -> [0: bb2, otherwise: bb1]; }

    bb1: {
        _0 = &'?2 _1; // bb1[0]
        goto -> bb3;
    }

    bb2: {
        _0 = &'?3 (*_2); // bb2[3]
        goto -> bb3;
    }

    bb3: {
        return;
    }
}
```

And the following region constraints:

<img width="236" height="583" alt="image" src="https://github.com/user-attachments/assets/4c450ccd-1c5c-4a9c-a4f1-0875cf0e5553" />

Note `'?5` and `'?6`: these don't show up in the MIR graph because they arise from the `enable_subtyping` closure in [`relate_opaques`](c9b7f17889/compiler/rustc_borrowck/src/type_check/relate_tys.rs (L116)). Importantly (today), these regions are related to each other (and to other regions in hidden types) *at a single point*, but **are not live at any point**.

For NLL this is not a problem (since liveness does not matter for outlives constraint propagation. For Polonius, this is an issue.

The fix here is fairly simple: consider these lifetimes live at all points. This may be an *overestimate* of liveness, but this is all code that doesn't get called with the next solver.

This is also the same reason that this is not an issue with the next solver. Opaque types are normalized in HIR typeck, so these hacky regions are never created.

There are a couple alternative fixes that I think are ultimately not as good:

1) Equate the previous hidden type with the new hidden type using `Locations::All` - when [registering the goals](c9b7f17889/compiler/rustc_borrowck/src/type_check/relate_tys.rs (L161)) from equating these two, force `Locations::All` instead of `Locations::Single`.
2) [**Equate all uses, not just the final defining use, in borrowck**](59a4c62a0e) - this has us store any duplicates in `insert_hidden_type`, which then get equated with the "expected" hidden type in `apply_definition_site_hidden_types` with `Locations::All`. I think this is fine, but a lot less "local" logic.

I'll note that for the next solver, we equate the hidden types with the return type in the signature with`Locations::Single`:

<img width="289" height="586" alt="image" src="https://github.com/user-attachments/assets/34d15820-06e3-4205-9278-e82465dca139" />

(note, this MIR is slightly different: `'5` is `short`'s lifetime; `'6` is the lifetime from the normalized opaque (`&'?6 ()`); `'4` is the renumbered lifetime for the MIR body)

Given that, perhaps (1) is the most faithful to the spirit of the next solver (that there is one hidden type that things get related to), but this seems like a *slightly* smaller-in-scope fix.

In any case, I think any solution here is mostly just a waiting game for the next solver.
2026-08-18 03:04:18 +00:00
jackh726
16ae7a414b Treat vars created for opaque subtyping as live everywhere 2026-08-18 01:15:43 +00:00
bors
8fa1c96cfd Auto merge of #161256 - JonathanBrouwer:rollup-WuI2sWX, r=JonathanBrouwer
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#161221 (`rust-analyzer` subtree update)
 - rust-lang/rust#161232 (Subtree sync for rustc_codegen_cranelift)
 - rust-lang/rust#160058 (atomic volatile: add intrinsics)
 - rust-lang/rust#161206 (Library lock file update)
 - rust-lang/rust#160905 (implement <IpAddr, SocketAddr>::unspecified_from())
 - rust-lang/rust#160986 (Move `LateParamRegion` to `rustc_type_ir`)
 - rust-lang/rust#161145 (Remove references to the obsolete `try-perf` branch)
 - rust-lang/rust#161197 (citool: update rust crates)
 - rust-lang/rust#161225 (Add regression test for lint panic on nested generic with default type param)
 - rust-lang/rust#161229 (rustc_target: couple AArch64 LLVM and cfg pauthtest ABIs)
 - rust-lang/rust#161230 (rename `#[rustc_dump_predicates]` to `#[rustc_dump_clauses]`)
 - rust-lang/rust#161237 (Remove jdno from infra-ci rotation)
2026-08-17 20:14:14 +00:00
Jonathan Brouwer
980686108d Rollup merge of #161237 - Kobzol:remove-jdno-from-rotation, r=jieyouxu
Remove jdno from infra-ci rotation

Triagebot keeps assigning JD to infra PRs, but I don't think that he has been active in reviewing for the past few months. So I think it's better to remove him from the rotation, to avoid unnecessary rerolls.

CC @jdno

r? marcoieni
2026-08-17 20:58:32 +02:00
Jonathan Brouwer
4ca8c3ab23 Rollup merge of #161230 - ada4a:ada/push-rtvwpxlrlrzz, r=JonathanBrouwer
rename `#[rustc_dump_predicates]` to `#[rustc_dump_clauses]`

Part of https://github.com/rust-lang/rust/issues/107250 / Follow-up to https://github.com/rust-lang/rust/pull/159990#discussion_r3656575503

The attribute dumps `clauses_of` an item, so rename accordingly.

r? @oli-obk
2026-08-17 20:58:31 +02:00
Jonathan Brouwer
b96e46a744 Rollup merge of #161229 - jchlanda:jakub/pauth_consistency, r=RalfJung
rustc_target: couple AArch64 LLVM and cfg pauthtest ABIs
2026-08-17 20:58:30 +02:00
Jonathan Brouwer
c5adbc43b5 Rollup merge of #161225 - zakrad:regr-test-155405, r=TaKO8Ki
Add regression test for lint panic on nested generic with default type param

Closes rust-lang/rust#155405
2026-08-17 20:58:29 +02:00
Jonathan Brouwer
0b2858ba5d Rollup merge of #161197 - xtqqczze:deps/lockfiles, r=Mark-Simulacrum
citool: update rust crates
2026-08-17 20:58:29 +02:00
Jonathan Brouwer
6e4e0a3f9b Rollup merge of #161145 - Kobzol:remove-rust-timer-branches, r=Mark-Simulacrum
Remove references to the obsolete `try-perf` branch

This is no longer needed after https://github.com/rust-lang/rustc-perf/pull/2524.
2026-08-17 20:58:28 +02:00
Jonathan Brouwer
eae9eff917 Rollup merge of #160986 - Jamesbarford:chore/move-late-param-region, r=lcnr
Move `LateParamRegion` to `rustc_type_ir`

Move `LateParamRegion` to `rustc_type_ir`. As per feedback, I created a `TrivialLiftImpls!` mirroring `rustc_middle`'s variant which is creates an identity function for `lift_to_interner(...)`.

Spun off from; https://github.com/rust-lang/rust/pull/160509

r? @lcnr
2026-08-17 20:58:27 +02:00
Jonathan Brouwer
32880c0626 Rollup merge of #160905 - malezjaa:imlpement-addr-unspecified-from, r=Mark-Simulacrum
implement <IpAddr, SocketAddr>::unspecified_from()

Tracking issue: rust-lang/rust#158975
I went ahead with an initial implementation, since there are still two unresolved questions in the tracking issue.
2026-08-17 20:58:26 +02:00
Jonathan Brouwer
9f52904e64 Rollup merge of #161206 - renovate-bot:renovate/lock-file-maintenance-library-lock-file-maintenance, r=clubby789
Library lock file update

This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

r? dep-bumps

🔧 This Pull Request updates lock files to use the latest dependency versions.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/rust).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yOS41IiwidXBkYXRlZEluVmVyIjoiNDQuMjkuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2026-08-17 20:58:25 +02:00
Jonathan Brouwer
765bc489c8 Rollup merge of #160058 - RalfJung:atomic-volatile, r=JohnTitor
atomic volatile: add intrinsics

Extend the atomic load/store intrinsics to also support volatile atomic load/store.
Tracking issue: https://github.com/rust-lang/rust/issues/158947.
Library APIs that use these intrinsics will be added inn a future PR.

The GCC and cranelift implementations ignore the volatile flag, not sure how that should be implemented for them.
2026-08-17 20:58:24 +02:00
Jonathan Brouwer
1651c56363 Rollup merge of #161232 - bjorn3:sync_cg_clif-2026-08-17, r=bjorn3
Subtree sync for rustc_codegen_cranelift

The main highlight this time is removing a patch file to make changes to portable-simd a bit easier to do.

r? @ghost

@rustbot label +A-codegen +A-cranelift +T-compiler +subtree-sync
2026-08-17 20:58:23 +02:00
Jonathan Brouwer
60e21c6b9c Rollup merge of #161221 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to bb3bbbd9e4.

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

r? @ghost
2026-08-17 20:58:22 +02:00
bors
e702ecae8a Auto merge of #160408 - fereidani:str_pattern, r=joboet
Single-byte ASCII searcher for StrSearcherImpl(pattern.rs)

This adds a fast single-byte ASCII searcher using memchr. It will be useful when the user is searching for single ASCII tokens such as `\s`,`"`, `'`, `/`, `\n`, etc which are common usecase in many applications.

Benchmark results:
| Benchmark | Current stable | ByteNeedle PR | Δ |
|---|---|---|---|
| find_1byte_str_long_nomatch | 36,476 | 3,630 | **−90% (10.0×)** |
| find_1byte_str_long_match_end | 37,129 | 3,703 | **−90% (10.0×)** |
| rfind_1byte_str_long_nomatch | 35,653 | 3,542 | **−90% (10.1×)** |
| split_1byte_str_sparse | 40,289 | 14,555 | **−64% (2.8×)** |
| find_1byte_str_short_haystack | 16,970 | 8,140 | −52% (2.1×) |
| find_1byte_str_early_return | 16,860 | 10,571 | −37% (1.6×) |
| find_str | 6,265 | 5,630 | −10% |
| rfind_str | 5,623 | 5,206 | −7% |
| find_str_worst_case | 1,192 | 1,104 | −7% |
| split_char_dense | 39,598 | 37,823 | −4.5% |
| find_char_long_match_end | 3,766 | 3,625 | −3.7% |
| split_1byte_str_multibyte_haystack | 78,827 | 76,092 | −3.5% |
| find_char_short_haystack | 4,203 | 4,070 | −3% |
| find_char_long_nomatch | 3,726 | 3,629 | −2.6% |
| split_char_sparse | 13,128 | 12,927 | −1.5% |
| ends_with / starts_with (×4) | 272 | 275 | +1% |
| rfind_char_long_nomatch | 3,520 | 3,557 | +1% |
| rfind_str_worst_case | 27,056 | 27,432 | +1.4% |
| split_char_multibyte_haystack | 57,433 | 60,890 | **+6%** |
| split_1byte_str_dense | 45,841 | 52,936 | **+15%** |

r? joboet
2026-08-17 17:06:02 +00:00
Jakub Chlanda
90366ec5fd Add comment for LlvmAbi::Pauthtest 2026-08-17 14:58:52 +00:00
Jakub Beránek
ea92154ad5 Remove jdno from infra-ci rotation 2026-08-17 14:37:33 +02:00
bors
6d656b1efc Auto merge of #161226 - JonathanBrouwer:rollup-StkCbag, r=JonathanBrouwer
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#160497 (Fix: WF ICE assumptions on binders)
 - rust-lang/rust#160845 (Better comments on small copy lists, explaining the limitations better)
 - rust-lang/rust#160869 (Add nightly-only support for Cargo unremap trim-paths files in `rust-lldb`)
 - rust-lang/rust#161214 (Reduce minimum LLDB to 21.1.0 for `lldb-repr` tests)
 - rust-lang/rust#161216 (Clean up some `lldb_batchmode` lints)
 - rust-lang/rust#161219 (bootstrap: Make various things non-pub)
2026-08-17 12:28:54 +00:00
Ada Alakbarova
b190091d40 rename #[rustc_dump_predicates] to #[rustc_dump_clauses] 2026-08-17 14:24:07 +02:00
bjorn3
b3e95724e7 Merge commit 'de3cd39a9be127b7c5f9744dfc865d57a9d564d3' into sync_cg_clif-2026-08-17 2026-08-17 13:16:14 +02:00
Jakub Chlanda
558f22f9ed rustc_target: couple AArch64 LLVM and cfg pauthtest ABIs 2026-08-17 11:04:14 +00:00
Jonathan Brouwer
4d181ed301 Rollup merge of #161219 - Zalathar:non-pub, r=Kobzol
bootstrap: Make various things non-pub

- Previously: https://github.com/rust-lang/rust/pull/161157
---

During my quest to move things out of bootstrap's `lib.rs`, I have found several clusters of code that start to emit dead-code warnings when `lib.rs` is cleared out.

This PR aims to pre-emptively resolve some of those clusters, by making various things non-pub and dealing with the resulting warnings.

There should be no change to bootstrap behaviour.
2026-08-17 12:46:12 +02:00
Jonathan Brouwer
2d929a13d2 Rollup merge of #161216 - Walnut356:batchmode_lints, r=jieyouxu
Clean up some `lldb_batchmode` lints

Notably, this also removes all(?) of the python 2 compatibility stuff. Since we're pinning CI LLDB/GDB anyway, and neither support python 2 anymore afaik, it shouldn't cause any issues.

r? @jieyouxu , @Kobzol
2026-08-17 12:46:11 +02:00
Jonathan Brouwer
67f1ccda24 Rollup merge of #161214 - Walnut356:repr_vers, r=jieyouxu
Reduce minimum LLDB to 21.1.0 for `lldb-repr` tests

I wrote `lldb-repr` against LLDB 22, but i don't think i actually use any 22-specific features. PR CI currently uses 21 iirc, so i'm curious if they pass there.

r? @Kobzol , @jieyouxu
2026-08-17 12:46:10 +02:00
Jonathan Brouwer
e4e92b2969 Rollup merge of #160869 - Urgau:trim-paths-lldb-support, r=Mark-Simulacrum
Add nightly-only support for Cargo unremap trim-paths files in `rust-lldb`

Same as rust-lang/rust#160560 but for `rust-lldb`.

This PR adds support in `rust-lldb` for the un-remapping file produced by Cargo with `-Ztrim-paths` (https://github.com/rust-lang/cargo/pull/17303). This support is nightly-only, and only activated when `RUST_LLDB_TRIM_PATHS=unstable` is set.

The processing is identical to the GDB script, the differences are regarding the interaction with LLDB and the need to setup a background thread.
2026-08-17 12:46:09 +02:00
Jonathan Brouwer
b05ef4f91b Rollup merge of #160845 - jdonszelmann:even-better-smol-copy-set-docs, r=nnethercote
Better comments on small copy lists, explaining the limitations better

r? @nnethercote

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
2026-08-17 12:46:08 +02:00
Jonathan Brouwer
9d649dbb4a Rollup merge of #160497 - ssenthilnathan3:fix/wf-ice-assumptions-on-binders, r=adwinwhite
Fix: WF ICE assumptions on binders

Fixes rust-lang/rust#160293

`-Zassumptions-on-binders` ICEs because the solver's `well_formed_goals` passes terms with resolvable inference variables to `unnormalized_obligations`, which asserts they're already resolved (unlike other callers).

Resolve inference variables before computing WF obligations.
2026-08-17 12:46:07 +02:00
malezjaa
53de5b09c1 implementation for feature addr_unspecified_from 2026-08-17 12:10:34 +02:00
bors
cfadd10310 Auto merge of #161215 - tgross35:update-builtins, r=tgross35
compiler-builtins subtree update

Subtree update of `compiler-builtins` to 62a57a01a0.

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

Closes: https://github.com/rust-lang/rust/issues/160051#issuecomment-5149624541

r? @ghost
2026-08-17 09:29:58 +00:00
bjorn3
de3cd39a9b Rustup to rustc 1.100.0-nightly (34baba539 2026-08-16) 2026-08-17 11:29:44 +02:00
zakrad
164eeabcf9 Add regression test for lint panic on nested generic with default type param 2026-08-17 12:49:31 +03:30
Zalathar
9d17faac03 Make all of crate::utils::exec non-pub 2026-08-17 17:32:00 +10:00
Zalathar
192a7f2d19 Delete some unused command-execution methods 2026-08-17 17:32:00 +10:00
Zalathar
2cd9d51705 Make all of crate::core::builder::cargo non-pub 2026-08-17 17:32:00 +10:00
Zalathar
c75a735501 Make Step and CommandLineStep non-pub 2026-08-17 17:32:00 +10:00
Zalathar
73467a13c2 Make Config non-pub 2026-08-17 17:32:00 +10:00
Zalathar
fac494eced Remove unused field Config::configure_args 2026-08-17 17:32:00 +10:00
Zalathar
f874124cc2 Make the Tool enum non-pub 2026-08-17 17:32:00 +10:00
Trevor Gross
1625994d53 c-b: Add comments about why miri is configured out 2026-08-17 02:06:42 -05:00
Walnut
881b89668a lints 2026-08-17 01:25:58 -05:00
Urgau
6166addc82 Add nightly-only support for Cargo unremap trim-paths files in rust-lldb 2026-08-17 08:07:36 +02:00
bors
8962ddaf8e Auto merge of #161208 - jhpratt:rollup-bgWoX3a, r=jhpratt
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#161127 (Make ShardedHashMap::with_capacity split capacity between shards)
 - rust-lang/rust#161183 (avoid pointless spans in target modifier errors)
 - rust-lang/rust#161203 (Analysis cleanups)
 - rust-lang/rust#155942 (Stabilize `-Zprofile-sample-use`)
 - rust-lang/rust#160939 (Fix std-features example in bootstrap.example.toml)
 - rust-lang/rust#161084 (Add regression test for test_case attribute on a use item)
 - rust-lang/rust#161139 (Add regression test for dyn impl missing type)
 - rust-lang/rust#161150 (add crashtests [4/N])
 - rust-lang/rust#161170 (Add regression test for trait on next solver)
 - rust-lang/rust#161173 (tidy: Properly restrict undocumented-unsafe to `library/core`)
 - rust-lang/rust#161191 (Improve `powerpc-types.rs` test)
 - rust-lang/rust#161198 (ping me when target ABI checks are being changed)
2026-08-17 05:47:43 +00:00
Senthilnathan
5b3fb6b103 resolve inference vars before enter_forall_with_assumptions in dyn upcasting 2026-08-17 11:10:59 +05:30
Walnut
dae325089f lower minimum lldb to 21.1 2026-08-17 00:38:40 -05:00
Trevor Gross
ae1a808ba9 c-b: Restore #![feature(abi_custom)]
This was recently stabilized, but we don't run the latest nighlty in all
CI.
2026-08-17 05:21:38 +00:00
Trevor Gross
c19a13ebd1 Merge ref '2c39ff499469' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@2c39ff4994
Filtered ref: rust-lang/compiler-builtins@87fd30bc5d
Upstream diff: f73951df0a...2c39ff4994

This merge was created using https://github.com/rust-lang/josh-sync.

(I also had to resolve a feature gate conflict in `lib.rs`.)
2026-08-17 05:18:17 +00:00
Trevor Gross
95b963bb0d Prepare for merging from rust-lang/rust
This updates the rust-version file to 2c39ff4994.
2026-08-17 05:16:00 +00:00
Zain Siddavatam
bb0d2bd624 Fix __hexagon_fmadf5 overflow under directed rounding
The overflow path in __hexagon_fmadf5 computed the round-mode predicate
(inf vs. largest-finite) into p0, but then overwrote p0 with
`dfcmp.eq(ATMP,ATMP)` before consuming it. Since ATMP is +inf,
`dfcmp.eq(ATMP,ATMP)` is always true, so CTMP was unconditionally set to
infinity and the rounding-mode decision was discarded.

As a result, a finite-magnitude overflow returned +/-inf in every
rounding mode.

Signed-off-by: Zain Siddavatam <zsiddava@qti.qualcomm.com>
2026-08-17 01:07:01 -04:00