Commit Graph

332722 Commits

Author SHA1 Message Date
Jonathan Brouwer
32ce99c38e Rollup merge of #159357 - jakubadamw:issue-148096-148620, r=folkertdev
Add regression tests for two fixed issues

This PR adds two regression tests for two ICE issues that have been identified as fixed and marked with E-needs-test.

Closes rust-lang/rust#148096.
Closes rust-lang/rust#148620.
2026-07-16 21:01:57 +02:00
Jonathan Brouwer
d09bf6512c Rollup merge of #159329 - reidliu41:fix-metrics-dir-warning, r=jieyouxu
Fix the stale metrics directory warning

The warning emitted when RUSTC_ICE overrides -Zmetrics-dir referenced
the nonexistent -Zerror-metrics option. Use the actual option name and
cover the warning text in the existing run-make test.
2026-07-16 21:01:57 +02:00
Jonathan Brouwer
6578cac707 Rollup merge of #159322 - yilin0518:fix_simd_1, r=RalfJung
Fix safety doc in intrinsics::simd

The Safety documentation for `simd_gather` and `simd_scatter` incorrectly described unmasked values in `T` as requiring readable or writable memory.

The memory access is performed through the corresponding enabled pointer lane in `ptr`, so this updates the documentation to state that requirement explicitly.
2026-07-16 21:01:56 +02:00
Jonathan Brouwer
0bdf554d2b Rollup merge of #159273 - kn1g78:tidy-handle-large-numeric-sorts, r=clubby789
tidy: document u64 limit for numeric sort keys

The `tidy-alphabetical` checker uses natural sorting for numeric sequences, parsing each sequence as `u64`.

Document this limit so that numeric sequences in marked lists remain within the supported range.
2026-07-16 21:01:55 +02:00
Jonathan Brouwer
7d1f162f49 Rollup merge of #159226 - oli-obk:extra_lifetime_params_map, r=petrochenkov
Track extra_lifetime_params_map per-owner

Part of https://github.com/rust-lang/rust-project-goals/issues/620

An easy one now that https://github.com/rust-lang/rust/pull/156508 is merged, as there are no more cross-owner dependencies on this table

r? @petrochenkov
2026-07-16 21:01:54 +02:00
Jonathan Brouwer
c5e1ca83ef Rollup merge of #158992 - estebank:shorten-type-highlighted-lt, r=mejrs
Shorten types more when only interesting part is lifetimes

We have a mechanims (`Highlight`) to change the name of inferred lifetimes in types so that we can refer to them by a number. Modify it so that it also avoids printing sub-parts of the type that are irrelevant to the situation at hand. The new behavior will print any sub part that has *any* lifetime (as they might be informative) instead of *just* the lifetimes being replaced. This was found to produce the best effect empirically in the test suite, striking a nice balance between shortening labels and being informative.

```
error: lifetime may not live long enough
  --> $DIR/wrong-closure-arg-suggestion-125325.rs:46:18
   |
LL |         take(|_| to_fn(|_| self.counter += 1));
   |              --- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`
   |              | |
   |              | return type of closure `aux::Map<{closure@...}>` contains a lifetime `'2`
   |              lifetime `'1` represents this closure's body
   |
   = note: closure implements `Fn`, so references to captured variables can't escape the closure
```
```
error: implementation of `FnOnce` is not general enough
  --> $DIR/higher-ranked-auto-trait-15.rs:20:5
   |
LL |     require_send(future);
   |     ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
   |
   = note: closure with signature `fn(&'0 _) -> Iter<'_, i32>` must implement `FnOnce<(&'1 Vec<i32>,)>`, for any two lifetimes `'0` and `'1`...
   = note: ...but it actually implements `FnOnce<(&Vec<i32>,)>`
```

Made this change after noticing that the first of the errors above had a corresponding `.stderr` file with lines longer than 150 columns by using `rg ".. \| .{150}" -g *.stderr`.
2026-07-16 21:01:53 +02:00
Jonathan Brouwer
1e4c3871fe Rollup merge of #159193 - Kobzol:compiletest-clap, r=jieyouxu,Zalathar
Port compiletest's CLI to clap

Suggested this in https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/compiletest.20CLI.20parsing/with/609693929.

My main motivation was to separate CLI arguments and the `Config` structure, because we derive a lot of non-CLI data for the latter struct, but before it was too tied to the CLI.
This PR is the first step towards that, in follow-up PRs I will clean up the `Config`.

The move itself was *very* boilerplate-y, so I decided to use Claude to perform the mechanical port (the first commit).
Then I went through all the flags, checked that they correspond to the old ones and should be parseable by clap.
I also did some light cleanups to remove extra parsing there.
This is in the second commit (no AI was involved in that).

This PR increases the dependency count of `compiletest` by 4. I think that's fine, and on CI it should be cached by `sccache` anyway.

r? @jieyouxu
2026-07-16 21:01:53 +02:00
Jonathan Brouwer
264672252c Rollup merge of #159395 - renovate-bot:renovate/crate-tracing-subscriber-vulnerability, r=jieyouxu
Update Rust crate tracing-subscriber [SECURITY]

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tracing-subscriber](https://tokio.rs) ([source](https://redirect.github.com/tokio-rs/tracing)) | dependencies | patch | `0.3.20` → `0.3.22` |
| [tracing-subscriber](https://tokio.rs) ([source](https://redirect.github.com/tokio-rs/tracing)) | dependencies | patch | `0.3.19` → `0.3.20` |
| [tracing-subscriber](https://tokio.rs) ([source](https://redirect.github.com/tokio-rs/tracing)) | dev-dependencies | patch | `0.3.20` → `0.3.22` |

---

###  Tracing logging user input may result in poisoning logs with ANSI escape sequences
[CVE-2025-58160](https://nvd.nist.gov/vuln/detail/CVE-2025-58160) / [GHSA-xwfj-jgwm-7wp5](https://redirect.github.com/advisories/GHSA-xwfj-jgwm-7wp5)

<details>
<summary>More information</summary>

#### Details
##### Impact

Previous versions of tracing-subscriber were vulnerable to ANSI escape sequence injection attacks. Untrusted user input containing ANSI escape sequences could be injected into terminal output when logged, potentially allowing attackers to:

- Manipulate terminal title bars
- Clear screens or modify terminal display
- Potentially mislead users through terminal manipulation

In isolation, impact is minimal, however security issues have been found in terminal emulators that enabled an attacker to use ANSI escape sequences via logs to exploit vulnerabilities in the terminal emulator.

##### Patches

`tracing-subscriber` version 0.3.20 fixes this vulnerability by escaping ANSI control characters in when writing events to destinations that may be printed to the terminal.

##### Workarounds

Avoid printing logs to terminal emulators without escaping ANSI control sequences.

##### References

https://www.packetlabs.net/posts/weaponizing-ansi-escape-sequences/

##### Acknowledgments

We would like to thank [zefr0x](http://github.com/zefr0x) who responsibly reported the issue at `security@tokio.rs`.

If you believe you have found a security vulnerability in any tokio-rs project, please email us at `security@tokio.rs`.

#### Severity
- CVSS Score: 2.3 / 10 (Low)
- Vector String: `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`

#### References
- [https://github.com/tokio-rs/tracing/security/advisories/GHSA-xwfj-jgwm-7wp5](https://redirect.github.com/tokio-rs/tracing/security/advisories/GHSA-xwfj-jgwm-7wp5)
- [https://nvd.nist.gov/vuln/detail/CVE-2025-58160](https://nvd.nist.gov/vuln/detail/CVE-2025-58160)
- [https://rustsec.org/advisories/RUSTSEC-2025-0055.html](https://rustsec.org/advisories/RUSTSEC-2025-0055.html)
- [https://github.com/advisories/GHSA-xwfj-jgwm-7wp5](https://redirect.github.com/advisories/GHSA-xwfj-jgwm-7wp5)

This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-xwfj-jgwm-7wp5) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>tokio-rs/tracing (tracing-subscriber)</summary>

### [`v0.3.22`](https://redirect.github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.22): tracing-subscriber 0.3.22

[Compare Source](https://redirect.github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.21...tracing-subscriber-0.3.22)

##### Important

The previous release [0.3.21] was yanked as it depended explicitly on
[tracing-0.1.42], which was yanked due to a breaking change (see [#&rust-lang/rust#8203;3424] for
details). This release contains all the changes from the previous release, plus
an update to the newer version of `tracing`.

##### Changed

- `tracing`: updated to 0.1.43 ([#&rust-lang/rust#8203;3427])

[#&rust-lang/rust#8203;3424]: https://redirect.github.com/tokio-rs/tracing/pull/3424

[#&rust-lang/rust#8203;3427]: https://redirect.github.com/tokio-rs/tracing/pull/3427

[0.3.21]: https://redirect.github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.21

[tracing-0.1.42]: https://redirect.github.com/tokio-rs/tracing/releases/tag/tracing-0.1.42

### [`v0.3.21`](https://redirect.github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.21): tracing-subscriber 0.3.21

[Compare Source](https://redirect.github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.20...tracing-subscriber-0.3.21)

##### Fixed

- Change registry exit to decrement local span ref only ([#&rust-lang/rust#8203;3331])
- Make Layered propagate `on_register_dispatch` ([#&rust-lang/rust#8203;3379])

##### Changed

- `tracing`: updated to 0.1.42 ([#&rust-lang/rust#8203;3418])

##### Performance

- Remove `clone_span` on enter ([#&rust-lang/rust#8203;3289])

##### Documented

- Fix a few small things in the format module ([#&rust-lang/rust#8203;3339])
- Fix extra closing brace in layer docs ([#&rust-lang/rust#8203;3350])
- Fix link in `FmtSpan` docs ([#&rust-lang/rust#8203;3411])

[#&rust-lang/rust#8203;3289]: https://redirect.github.com/tokio-rs/tracing/pull/#&rust-lang/rust#8203;3289

[#&rust-lang/rust#8203;3331]: https://redirect.github.com/tokio-rs/tracing/pull/#&rust-lang/rust#8203;3331

[#&rust-lang/rust#8203;3339]: https://redirect.github.com/tokio-rs/tracing/pull/#&rust-lang/rust#8203;3339

[#&rust-lang/rust#8203;3350]: https://redirect.github.com/tokio-rs/tracing/pull/#&rust-lang/rust#8203;3350

[#&rust-lang/rust#8203;3379]: https://redirect.github.com/tokio-rs/tracing/pull/#&rust-lang/rust#8203;3379

[#&rust-lang/rust#8203;3411]: https://redirect.github.com/tokio-rs/tracing/pull/#&rust-lang/rust#8203;3411

[#&rust-lang/rust#8203;3418]: https://redirect.github.com/tokio-rs/tracing/pull/#&rust-lang/rust#8203;3418

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjUuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI2NS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2026-07-16 21:01:52 +02:00
Jonathan Brouwer
d69c73211a Rollup merge of #159394 - renovate-bot:renovate/crate-tar-vulnerability, r=jieyouxu
Update Rust crate tar to v0.4.46 [SECURITY]

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tar](https://redirect.github.com/composefs/tar-rs) | dependencies | patch | `0.4.45` → `0.4.46` |

---

### tar has a PAX header desynchronization issue
[GHSA-3pv8-6f4r-ffg2](https://redirect.github.com/advisories/GHSA-3pv8-6f4r-ffg2)

<details>
<summary>More information</summary>

#### Details
##### Summary

When a tar stream contains multiple "header" entries prior to a file entry, tar-rs applies the PAX header (`x`) to the _next_ entry in the stream, regardless of type. For example, a stream of `x -> L -> file` (PAX, GNU longname, file) would result in `x`'s extensions being applied to `L` rather than to `file`.

[Per POSIX pax](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/pax.html), this is incorrect: a PAX header always applies to a file entry, not any intermediary entries. See the "pax Header Block" section for the specific prescription there.

As a result of this, an attacker can contrive a tar containing a sequence of tar headers such that tar-rs applies the PAX header's `size` extension to the next header in sequence, effectively desynchronizing the stream and enabling tar-rs specific skippage/extraction of members. In other words, a file can be contrived to extract differently on tar-rs than on other tar parsers.

##### PoC

[This tar](https://redirect.github.com/user-attachments/files/27141941/pax-overrides-extension-header.tar.zip) (zipped for size) demonstrates the desynchronization: with `tar tvf`:

```
% tar tvf tests/archives/pax-overrides-extension-header.tar
----------  0 0      0        2048 Dec 31  1969 longname.txt
----------  0 0      0           0 Dec 31  1969 file_b
```

with `tar-rs`:

```
---- pax_size_does_not_apply_to_extension_headers stdout ----

thread 'pax_size_does_not_apply_to_extension_headers' (250476889) panicked at tests/all.rs:2121:27:
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "numeric field was not a number: AAAAAAAA when getting cksum for AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

In the above case, the PoC is not weaponized, so it jumps into the middle of an entry and subsequently fails the checksum test rather than silently continuing with attacker-controlled archive state.

##### Impact

This is very similar to GHSA-j5gw-2vrg-8fgx and GHSA-fp55-jw48-c537 in impact -- an attacker can use this to extract (or not extract) files from a tar stream depending on the tar parser used, which in turn can be used to obscure the presence of malicious files.

#### Severity
Medium

#### References
- [https://github.com/composefs/tar-rs/security/advisories/GHSA-3pv8-6f4r-ffg2](https://redirect.github.com/composefs/tar-rs/security/advisories/GHSA-3pv8-6f4r-ffg2)
- [https://github.com/composefs/tar-rs/pull/454](https://redirect.github.com/composefs/tar-rs/pull/454)
- [bab14dd84b)
- [https://github.com/composefs/tar-rs/releases/tag/0.4.46](https://redirect.github.com/composefs/tar-rs/releases/tag/0.4.46)
- [https://github.com/advisories/GHSA-3pv8-6f4r-ffg2](https://redirect.github.com/advisories/GHSA-3pv8-6f4r-ffg2)

This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-3pv8-6f4r-ffg2) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>composefs/tar-rs (tar)</summary>

### [`v0.4.46`](https://redirect.github.com/composefs/tar-rs/releases/tag/0.4.46)

[Compare Source](https://redirect.github.com/composefs/tar-rs/compare/0.4.45...0.4.46)

#### Security

- archive: Fix another PAX header desync (GHSA-3cv2-h65g-fgmm) by [@&#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&#8203;454](https://redirect.github.com/composefs/tar-rs/pull/454)

See also <https://github.com/astral-sh/tokio-tar/security/advisories/GHSA-3cv2-h65g-fgmm>

#### Other changes

- ci: Fix and re-enable reverse dependency testing by [@&#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&#8203;444](https://redirect.github.com/composefs/tar-rs/pull/444)
- Update astral-tokio-tar requirement from 0.5 to 0.6 by [@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in [#&#8203;446](https://redirect.github.com/composefs/tar-rs/pull/446)
- Update some links by [@&#8203;atouchet](https://redirect.github.com/atouchet) in [#&#8203;445](https://redirect.github.com/composefs/tar-rs/pull/445)
- Add support of absolute paths by [@&#8203;zxvfc](https://redirect.github.com/zxvfc) in [#&#8203;426](https://redirect.github.com/composefs/tar-rs/pull/426)
- docs: Expand notes on concurrent mutations and following symlinks by [@&#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&#8203;453](https://redirect.github.com/composefs/tar-rs/pull/453)
- Update repo links by [@&#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&#8203;451](https://redirect.github.com/composefs/tar-rs/pull/451)
- ci: Add crates.io trusted publishing workflow by [@&#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&#8203;456](https://redirect.github.com/composefs/tar-rs/pull/456)
- Release 0.4.46 by [@&#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&#8203;455](https://redirect.github.com/composefs/tar-rs/pull/455)

#### New Contributors

- [@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] made their first contribution in [#&#8203;446](https://redirect.github.com/composefs/tar-rs/pull/446)
- [@&#8203;atouchet](https://redirect.github.com/atouchet) made their first contribution in [#&#8203;445](https://redirect.github.com/composefs/tar-rs/pull/445)
- [@&#8203;zxvfc](https://redirect.github.com/zxvfc) made their first contribution in [#&#8203;426](https://redirect.github.com/composefs/tar-rs/pull/426)

**Full Changelog**: <https://github.com/composefs/tar-rs/compare/0.4.45...0.4.46>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- 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.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjUuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI2NS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2026-07-16 21:01:51 +02:00
Jonathan Brouwer
296750bf40 Rollup merge of #159393 - renovate-bot:renovate/crate-rkyv-vulnerability, r=jieyouxu
Update Rust crate rkyv to v0.8.16 [SECURITY]

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rkyv](https://redirect.github.com/rkyv/rkyv) | dependencies | patch | `0.8.15` → `0.8.16` |

---

### rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution
[GHSA-vfvv-c25p-m7mm](https://redirect.github.com/advisories/GHSA-vfvv-c25p-m7mm)

<details>
<summary>More information</summary>

#### Details
`InlineVec::clear()` and `SerVec::clear()` in `rkyv` were not panic-safe. Both functions iterate over their elements and call `drop_in_place` on each, updating `self.len` only *after* the loop. If an element's `Drop` implementation panics during the loop, `self.len` is left at its original value.

A subsequent invocation of `clear()` on the same container then re-visits the already-freed elements:

- `InlineVec::clear()` is called again from `InlineVec`'s own `Drop` implementation when the value is later dropped.
- `SerVec::clear()` is called again by `SerVec::with_capacity()` after the  user closure returns.

##### Technical Impact

- **CWE-415 (Double Free):** Heap corruption when element type holds `Box<T>`
- **CWE-416 (Use-After-Free):** Memory corruption when element reads from heap during `Drop`

Both vulnerabilities are triggerable entirely from safe Rust via `std::panic::catch_unwind` and require no special privileges.

#### Severity
- CVSS Score: 6.9 / 10 (Medium)
- Vector String: `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`

#### References
- [5828cf5c27)
- [https://rustsec.org/advisories/RUSTSEC-2026-0122.html](https://rustsec.org/advisories/RUSTSEC-2026-0122.html)
- [https://github.com/advisories/GHSA-vfvv-c25p-m7mm](https://redirect.github.com/advisories/GHSA-vfvv-c25p-m7mm)

This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-vfvv-c25p-m7mm) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>rkyv/rkyv (rkyv)</summary>

### [`v0.8.16`](https://redirect.github.com/rkyv/rkyv/compare/0.8.15...0.8.16)

[Compare Source](https://redirect.github.com/rkyv/rkyv/compare/0.8.15...0.8.16)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- 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.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjUuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI2NS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2026-07-16 21:01:50 +02:00
Jonathan Brouwer
43352e9aa1 Rollup merge of #159392 - renovate-bot:renovate/crate-rand-vulnerability, r=jieyouxu
Update Rust crate rand to v0.9.3 [SECURITY]

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rand](https://rust-random.github.io/book) ([source](https://redirect.github.com/rust-random/rand)) | dependencies | patch | `0.9.2` → `0.9.3` |
| [rand](https://rust-random.github.io/book) ([source](https://redirect.github.com/rust-random/rand)) | dev-dependencies | patch | `0.9.2` → `0.9.3` |

---

### Rand is unsound with a custom logger using rand::rng()
[GHSA-cq8v-f236-94qc](https://redirect.github.com/advisories/GHSA-cq8v-f236-94qc)

<details>
<summary>More information</summary>

#### Details
It has been reported (by @&rust-lang/rust#8203;lopopolo) that the `rand` library is [unsound](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library) (i.e. that safe code using the public API can cause Undefined Behaviour) when all the following conditions are met:

- The `log` and `thread_rng` features are enabled
- A [custom logger](https://docs.rs/log/latest/log/#implementing-a-logger) is defined
- The custom logger accesses `rand::rng()` (previously `rand::thread_rng()`) and calls any `TryRng` (previously `RngCore`) methods on `ThreadRng`
- The `ThreadRng` (attempts to) reseed while called from the custom logger (this happens every 64 kB of generated data)
- Trace-level logging is enabled or warn-level logging is enabled and the random source (the `getrandom` crate) is unable to provide a new seed

`TryRng` (previously `RngCore`) methods for `ThreadRng` use `unsafe` code to cast `*mut BlockRng<ReseedingCore>` to `&mut BlockRng<ReseedingCore>`. When all the above conditions are met this results in an aliased mutable reference, violating the Stacked Borrows rules. Miri is able to detect this violation in sample code. Since construction of [aliased mutable references is Undefined Behaviour](https://doc.rust-lang.org/stable/nomicon/references.html), the behaviour of optimized builds is hard to predict.

#### Severity
Low

#### References
- [https://github.com/rust-random/rand/pull/1763](https://redirect.github.com/rust-random/rand/pull/1763)
- [https://rustsec.org/advisories/RUSTSEC-2026-0097.html](https://rustsec.org/advisories/RUSTSEC-2026-0097.html)
- [https://github.com/advisories/GHSA-cq8v-f236-94qc](https://redirect.github.com/advisories/GHSA-cq8v-f236-94qc)

This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-cq8v-f236-94qc) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>rust-random/rand (rand)</summary>

### [`v0.9.3`](https://redirect.github.com/rust-random/rand/compare/0.9.2...0.9.3)

[Compare Source](https://redirect.github.com/rust-random/rand/compare/0.9.2...0.9.3)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- 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.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjUuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI2NS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2026-07-16 21:01:50 +02:00
Jonathan Brouwer
943683ba88 Rollup merge of #159177 - Kobzol:compiletest-debugger-config, r=jieyouxu
Explicitly materialize debuginfo tests for all debuggers

When testing https://github.com/rust-lang/rust/pull/158298, I realized that when you don't have a given debugger (CDB, GDB, LLDB) available, compiletest will silently skip generating "variants" of debuginfo tests for a given debugger. So if you run a single debuginfo test, it will run 0/1/2/3 tests, based on what debuggers you have available. So it will show `running 1/2/3 tests` without telling you that it is actually three separate tests, but some of them were automatically ignored.

This is made even worse by the fact that bootstrap/compiletest currently automatically discovers debuggers, so there is a lot of implicit behavior stacked on top of each other.

This PR changes that, so that compiletest *always* creates all three variants of the tests, but if you don't have a debugger X available, then the X variant will be ignored, so you can see clearly in the output that it was ignored and why, which is much better than the test simply disappearing.

So after running a given debuginfo test, you will see e.g. this:
```
running 3 tests
test [debuginfo-cdb] tests/debuginfo/basic-types.rs ... ignored, cdb is not available
test [debuginfo-gdb] tests/debuginfo/basic-types.rs ... ok
test [debuginfo-lldb] tests/debuginfo/basic-types.rs ... ok
```

Which makes it more more obvious that there are in fact three separate tests, but some of them are ignored (and why).

The way this is achieved is a bit hacky, but that is caused by the previous way compiletest did things. To simulate the three variants of each debuginfo test, compiletest currently generates a separate instance (!) of the `Config` for each debugger, in the `run_tests` function. That's quite hacky, to say the least, and it requires storing a `debugger` field in the `Config`, which specifies for which variant we are currently running the debuginfo test.

I wanted to try using a single config, and encoding the CDB/GDB/LLDB variants as revisions instead. However, I found out that some debuginfo tests actually do use revisions for.. actual revisions, which caught me by surprise. So we would either need to expand the set of used revisions, so that if the test has e.g. `revision=lto`, `revision=no-lto`, we would then turn that into:
- `revision=lto-cdb`
- `revision=lto-gdb`
- `revision=no-lto-cdb`
- `revision=no-lto-gdb`
- `revision=no-lto-lldb`

That's maybe not such a bad solution, and it would allow us to use a single `Config` instance, but it would also require either encoding the debugger inside the revision string and then parsing it out (ugh), or turning revisions into a struct that would contain multiple information (such as the debugger used and then the revision name).

Or we could introduce a separate mechanism for "multiplying" tests, but we already have revisions, and it seems overkill to introduce something like this only for debuggers (unless it is also needed at other places...).

So what I did in this PR instead is to keep the three separate configs, but rather than not generating the Config when a debugger is missing, we *always* generate a separate config for each debugger, but then we ignore tests that do not match the "active" debugger in the Config. Because this ignore logic is not per directive line, but per test, so I had to introduce a new block of code that does that, but that seems fine to me, when compared to the mountain of hacks already present in this part of the codebase xD

This is implemented in the second commit, the first commit is just a small simplification refactoring.

r? @jieyouxu

Fixes: https://github.com/rust-lang/rust/issues/126628
2026-07-16 21:01:49 +02:00
Jonathan Brouwer
d55ab96dac Rollup merge of #158758 - josetorrs:rename-lazy-type-alias, r=lcnr
Rename `lazy_type_alias` feature gate to `checked_type_aliases`

there's not an open issue for it, though happy to create one if desired, but [this](https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/ask.20for.20help.3A.20rename.20.60lazy_type_alias.60.20feature/near/608089932) is the zulip thread. basically just did a cmd+shift+F on VSCode

r? @lcnr

cc: @BoxyUwU
2026-07-16 21:01:48 +02:00
Jonathan Brouwer
913361273f Rollup merge of #150679 - Qelxiros:dirfd-files, r=Mark-Simulacrum
dirfd file operations (2/4)

Previous PR: rust-lang/rust#146341
Reference: rust-lang/rust#139514
Tracking issue: rust-lang/rust#120426
2026-07-16 21:01:47 +02:00
Mend Renovate
663d082bd9 Update Rust crate tracing-subscriber [SECURITY] 2026-07-16 14:40:35 +00:00
Mend Renovate
e4ed50d0d3 Update Rust crate tar to v0.4.46 [SECURITY] 2026-07-16 14:40:18 +00:00
Mend Renovate
458cc7fc7f Update Rust crate rkyv to v0.8.16 [SECURITY] 2026-07-16 14:40:04 +00:00
Mend Renovate
4946081a94 Update Rust crate rand to v0.9.3 [SECURITY] 2026-07-16 14:39:53 +00:00
Jeremy Smart
b6849b3c0e add file operations to std dirfd 2026-07-16 12:24:24 +00:00
bors
a6050b7ea8 Auto merge of #158249 - jdonszelmann:move-checks, r=lcnr
Move fast paths around to gain a bit of new-solver perf


Change in % compared to previous commit on 4 benchmarks. All measured locally on ragdoll (AMD RYZEN 3990X, x86_64). These benchmarks have been quite repeatable in the past, but don't exactly match perf runs. All benchmarks show change in instruction count
First change is compared to baseline
Commit ids may change on rebases, so these links may become outdated.

|                                                                                                                                                           | nalgebra [check,debug,opt]                                                      | serde [check,debug, opt]                                                        | syn [check, debug, opt]                                                         | wg-grammar [check, debug, opt]                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [move overflow check](039cc59ac1)                                     | $${\color{green}-0.04\\%}$$<br> $${\color{green}-0.03\\%}$$<br> $${\color{green}-0.02\\%}$$ | $${\color{green}-0.15\\%}$$<br> $${\color{green}-0.12\\%}$$<br> $${\color{green}-0.11\\%}$$ | $${\color{green}-0.08\\%}$$<br> $${\color{green}-0.04\\%}$$<br> $${\color{green}-0.01\\%}$$ | $${\color{green}-0.32\\%}$$<br> $${\color{green}-0.31\\%}$$<br> $${\color{green}-0.29\\%}$$    |
| [move fast path into evaluate_goal](8cc6291e86)                       | $${\color{red}+0.61\\%}$$<br> $${\color{red}+0.60\\%}$$<br> $${\color{red}+0.43\\%}$$       | $${\color{red}+0.75\\%}$$<br> $${\color{red}+0.69\\%}$$<br> $${\color{red}+0.65\\%}$$       | $${\color{red}+0.55\\%}$$<br> $${\color{red}+0.36\\%}$$<br> $${\color{red}+0.14\\%}$$       | $${\color{red}+0.13\\%}$$<br> $${\color{red}+0.21\\%}$$<br> $${\color{red}+0.15\\%}$$          |
| [remove fastpath from fullfilment loop](3536b417b5)                   | $${\color{red}+0.56\\%}$$<br> $${\color{red}+0.50\\%}$$<br> $${\color{red}+0.35\\%}$$       | $${\color{red}+3.33\\%}$$<br> $${\color{red}+2.76\\%}$$<br> $${\color{red}+2.55\\%}$$       | $${\color{red}+1.65\\%}$$<br> $${\color{red}+0.93\\%}$$<br> $${\color{red}+0.33\\%}$$       | $${\color{green}-5.06\\%}$$<br> $${\color{green}-5.00\\%}$$<br> $${\color{green}-4.65\\%}$$    |
| [return stalled info from fast path](187954fb08)                      | $${\color{red}+0.16\\%}$$<br> $${\color{red}+0.16\\%}$$<br> $${\color{red}+0.12\\%}$$       | $${\color{red}+0.01\\%}$$<br> $${\color{red}+0.01\\%}$$<br> $${\color{red}+0.01\\%}$$       | $${\color{red}+0.24\\%}$$<br> $${\color{red}+0.15\\%}$$<br> $${\color{red}+0.05\\%}$$       | $${\color{green}-0.24\\%}$$<br> $${\color{green}-0.24\\%}$$<br> $${\color{green}-0.25\\%}$$    |
| [move goal fast path into evaluate_goal_cold](4946875445)             | $${\color{red}+0.01\\%}$$<br> $${\color{red}+0.01\\%}$$<br> $${\color{red}+0.01\\%}$$       | $${\color{red}+0.02\\%}$$<br> $${\color{red}+0.02\\%}$$<br> $${\color{red}+0.02\\%}$$       | $${\color{red}+0.02\\%}$$<br> $${\color{red}+0.02\\%}$$<br> $${\color{red}+0.01\\%}$$       | $${\color{green}-0.01\\%}$$<br> $${\color{green}-0.01\\%}$$<br> $${\color{green}-0.01\\%}$$    |
| [shuffle fastpaths around to before creating an evalctxt](58f22e8941) | $${\color{green}-0.44\\%}$$<br> $${\color{green}-0.41\\%}$$<br> $${\color{green}-0.30\\%}$$ | $${\color{green}-2.31\\%}$$<br> $${\color{green}-1.93\\%}$$<br> $${\color{green}-1.80\\%}$$ | $${\color{green}-1.29\\%}$$<br> $${\color{green}-0.77\\%}$$<br> $${\color{green}-0.29\\%}$$ | $${\color{green}-6.06\\%}$$<br> $${\color{green}-5.90\\%}$$<br> $${\color{green}-5.48\\%}$$    |
| [fast path when adding goals](adbd01966e)                             | $${\color{green}-0.62\\%}$$<br> $${\color{green}-0.58\\%}$$<br> $${\color{green}-0.41\\%}$$ | $${\color{green}-0.78\\%}$$<br> $${\color{green}-0.66\\%}$$<br> $${\color{green}-0.61\\%}$$ | $${\color{green}-0.36\\%}$$<br> $${\color{green}-0.28\\%}$$<br> $${\color{green}-0.10\\%}$$ | $${\color{green}-0.12\\%}$$<br> $${\color{green}-0.09\\%}$$<br> $${\color{green}-0.04\\%}$$    |
| overall from baseline                                                                                                                                     | $${\color{red}+0.24\\%}$$<br> $${\color{red}+0.23\\%}$$<br> $${\color{red}+0.16\\%}$$       | $${\color{red}+0.79\\%}$$<br> $${\color{red}+0.70\\%}$$<br> $${\color{red}+0.66\\%}$$       | $${\color{red}+0.60\\%}$$<br> $${\color{red}+0.36\\%}$$<br> $${\color{red}+0.13\\%}$$       | $${\color{green}-11.31\\%}$$<br> $${\color{green}-11.00\\%}$$<br> $${\color{green}-10.27\\%}$$ |
2026-07-16 12:09:58 +00:00
Jana Dönszelmann
a572787c13 review comments (nits) 2026-07-16 11:13:12 +02:00
Jana Dönszelmann
1cb6d00d8a fix bug when fast paths aren't rerun when opaques change 2026-07-16 10:58:16 +02:00
Jana Dönszelmann
203832a839 fast path when adding goals 2026-07-16 10:58:15 +02:00
Jana Dönszelmann
f806e9b85a shuffle fastpaths around to before creating an evalctxt 2026-07-16 10:55:28 +02:00
Jana Dönszelmann
47b6070fbb move goal fast path into evaluate_goal_cold 2026-07-16 10:44:53 +02:00
Jana Dönszelmann
15d7b5b088 return stalled info from fast path 2026-07-16 10:44:53 +02:00
Jana Dönszelmann
d54b2abaa4 experiment with better evaluate_goal_step 2026-07-16 10:44:53 +02:00
Jana Dönszelmann
238614538d remove fastpath from fullfilment loop 2026-07-16 10:44:53 +02:00
Jana Dönszelmann
88ee7e462f move fast path into evaluate_goal 2026-07-16 10:44:53 +02:00
Jana Dönszelmann
378f1af5fd move overflow check 2026-07-16 10:44:53 +02:00
bors
d62fb1c8a0 Auto merge of #159367 - jhpratt:rollup-m6CJJYQ, r=jhpratt
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#159028 (fuchsia: Ensure all existing ported sanitizers for Fuchsia are supported)
 - rust-lang/rust#159339 (Resolver: extract `use_injections` out of main `Resolver`)
 - rust-lang/rust#159342 (renovate: group github actions updates)
2026-07-16 08:36:04 +00:00
Jacob Pratt
83dae99030 Rollup merge of #159342 - marcoieni:renovate-plugin, r=Kobzol
renovate: group github actions updates

r? @Kobzol
2026-07-16 04:02:33 -04:00
Jacob Pratt
09be986317 Rollup merge of #159339 - LorrensP-2158466:extract-use-injections, r=petrochenkov
Resolver: extract `use_injections` out of main `Resolver`

Prep work for rust-lang/rust#158845. Extract the `use_injections` field out of the resolver and into the `LateResolutionVisitor`. It can then be passed into the `report_errors` pass, so no behaviour is changed.

This allows the `Resolver` to be `DynSync`, see https://github.com/rust-lang/rust/pull/158845#discussion_r3579712892.

r? @petrochenkov
2026-07-16 04:02:33 -04:00
Jacob Pratt
83c03bb6b5 Rollup merge of #159028 - PiJoules:fuchsia-sanitizers, r=workingjubilee
fuchsia: Ensure all existing ported sanitizers for Fuchsia are supported
2026-07-16 04:02:32 -04:00
Oli Scherer
5ccf44c02c Track extra_lifetime_params_map per-owner 2026-07-16 09:44:03 +02:00
bors
ab4bbeb07d Auto merge of #159354 - zedddie:gsoc-batch-25-meow, r=Kivooeo
Reorganize `tests/ui/issues` [25/N]

Part of [GSoC'26 project](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Reorganizing.20tests.2Fui.2Fissues)

r? Kivooeo
@Teapot4195
2026-07-16 05:26:38 +00:00
bors
2d0faf8fea Auto merge of #158323 - Unique-Usman:ua/invalid_source_file, r=nnethercote
rustc: improve diagnostics for file-open failures



Fix: [#156070](https://github.com/rust-lang/rust/issues/156070)
2026-07-16 02:08:28 +00:00
Jacob Adam
2329d130ba Add a regression test for a const parameter default body param-env ICE 2026-07-16 00:18:16 +01:00
Jacob Adam
05d7d3bd7a Add a regression test for an associated const equality region variable hashing ICE 2026-07-16 00:15:48 +01:00
bors
fcbe7917ba Auto merge of #158962 - josetorrs:add-proc-macr-attribute-documentation, r=GuillaumeGomez
Add `proc_macro` attribute documentation



part of https://github.com/rust-lang/rust/issues/157604

r? @GuillaumeGomez 

cc: @fmease  

(I wasn't sure who to exactly tag. I see several PR's switch between you two)
2026-07-15 22:37:48 +00:00
zedddie
e5a03bc9c0 bless batch 2026-07-15 23:38:07 +02:00
zedddie
62fbd98dd9 move batch 2026-07-15 23:38:07 +02:00
bors
d0babd8b6b Auto merge of #159350 - JonathanBrouwer:rollup-V056aOq, r=JonathanBrouwer
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#158764 (Improve E0277 for imperfect derives)
 - rust-lang/rust#159345 (std: upgrade `addr2line`, `object`, `miniz_oxide`)
2026-07-15 19:18:13 +00:00
Jose
4bf0b7624a add proc_macro attribute documentation
Co-authored-by: Guillaume Gomez <contact@guillaume-gomez.fr>
2026-07-15 15:05:23 -04:00
Jonathan Brouwer
abc46f49b2 Rollup merge of #159345 - cuviper:std-deps, r=Darksonn
std: upgrade `addr2line`, `object`, `miniz_oxide`

The `addr2line` upgrade also upgrades `gimli`, and we need a new
`unwinding` to align on that. No code changes are required.

See also rust-lang/backtrace-rs#765, but since `std` uses that as a
`#[path] mod backtrace_rs`, we don't need to wait for the crate update.
2026-07-15 20:54:35 +02:00
Jonathan Brouwer
ed2989e672 Rollup merge of #158764 - raushan728:issues/157117, r=estebank
Improve E0277 for imperfect derives

Relates to rust-lang/rust#157117
2026-07-15 20:54:34 +02:00
Usman Akinyemi
dbee3dd369 rustc: improve diagnostics for file-open failures
Emit more targeted diagnostics when an input file cannot be opened,
including dedicated messages for common error kinds and typo
suggestions for missing files. Add run-make tests covering NotFound,
PermissionDenied, IsADirectory, and non-existent directory cases.

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
2026-07-15 23:25:52 +05:30
Yilin Chen
95ae48e8e6 Fix safety doc in intrinsics::simd 2026-07-16 01:55:32 +08:00
Josh Stone
08bda6d9b5 std: upgrade addr2line, object, miniz_oxide
The `addr2line` upgrade also upgrades `gimli`, and we need a new
`unwinding` to align on that. No code changes are required.
2026-07-15 09:47:20 -07:00
Esteban Küber
c6f56924a3 Tweak shortened closure logic 2026-07-15 16:37:18 +00:00