Commit Graph

326993 Commits

Author SHA1 Message Date
cijiugechu d24fd77ebe Make const param default test reproduce original ICE 2026-05-15 18:32:42 +08:00
bors 7c3c88f42a Auto merge of #156576 - GuillaumeGomez:rollup-3CJ0vjd, r=GuillaumeGomez
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#146220 (feat(rustdoc): stabilize `--emit` flag)
 - rust-lang/rust#153785 (Hand-written Debug implementation for `TypeTest`)
 - rust-lang/rust#156564 (Lint level cleanups)
2026-05-14 15:03:57 +00:00
Guillaume Gomez 1f5737c853 Rollup merge of #156564 - nnethercote:LevelSpec, r=GuillaumeGomez
Lint level cleanups

Some naming improvements, some type safety improvements, and some simplifications. Details in individual commits.

r? @GuillaumeGomez
2026-05-14 16:51:08 +02:00
Guillaume Gomez a0e620a9bb Rollup merge of #153785 - amandasystems:debug-type-test, r=wesleywiser
Hand-written Debug implementation for `TypeTest`

This adds a hand-written debug format for `TypeTest`s that at least was helpful for me when debugging because I always struggle to remember which component is which. It formats a type test using the Unicode turnstile symbol (for "computes") to illustrate that the test encodes a typing rule that, if it holds, produces a conclusion.

The format is: `TypeTest from {originating span} {bound}  ⊢ T: 'lower_bound`, where `T` is the generic type being tested and `lower_bound` is the lower bound. Bounds are formatted as you would expect, but where the region for `'lower_bound` is included in the outlives constraints for context. I resisted the urge to turn `ALL [A, ..., Z]` into `[A  ∧ ...  ∧ Z]` etc.

## What it looks like

Here's an example of a simple type test from the test suite that says that some type `I/#0` will be lower-bounded (outlive) `?4` iff `'?1: '?4`:

Before:
```
$ RUSTC_LOG="rustc_borrowck::region_infer=debug" rustc +stage1 tests/ui/associated-types/associated-types-eq-3.rs
...
DEBUG rustc_borrowck::region_infer type tests: [
     TypeTest {
         generic_kind: I/#0,
         lower_bound: '?4,
         span: tests/ui/associated-types/associated-types-eq-3.rs:21:18: 21:25 (#0),
         verify_bound: OutlivedBy(
             '?1,
         ),
     },
     TypeTest {
         generic_kind: I/#0,
         lower_bound: '?4,
         span: tests/ui/associated-types/associated-types-eq-3.rs:21:18: 21:25 (#0),
         verify_bound: OutlivedBy(
             '?1,
         ),
     },
 ]
...
```

After:
```
$ RUSTC_LOG="rustc_borrowck::region_infer=debug" rustc +stage1 tests/ui/associated-types/associated-types-eq-3.rs
...
 DEBUG rustc_borrowck::region_infer type tests: [
     TypeTest from tests/ui/associated-types/associated-types-eq-3.rs:21:18: 21:25 (#0)['?1: '?4] ⊢ I/#0: '?4,
     TypeTest from tests/ui/associated-types/associated-types-eq-3.rs:21:18: 21:25 (#0)['?1: '?4] ⊢ I/#0: '?4,
 ]
...
```
2026-05-14 16:51:07 +02:00
Guillaume Gomez 6f222b3f90 Rollup merge of #146220 - weihanglo:rustdoc-emit, r=GuillaumeGomez
feat(rustdoc): stabilize `--emit` flag

### [---> FCP <---](https://github.com/rust-lang/rust/pull/146220#issuecomment-3740447985)

## Stabilization Report: `rustdoc --emit`

**Feature:** `rustdoc --emit`
**Tracking issue:** rust-lang/rust#83784
**Stabilization PR:** rust-lang/rust#146220

### What we are stabilizing

This stabilizes the `rustdoc --emit` flag, which controls what types of output rustdoc produces. The flag accepts a comma-separated list of the following emit types:

- `html-static-files` --- Shared static files with content-hashed filenames for safe caching.
- `html-non-static-files` --- Per-crate documentation files with deterministic filenames.
- `dep-info[=<path>]` --- A Makefile-compatible `.d` file listing all source files loaded during documentation generation. Same as rustc's dep-info files.

When `--emit` is not specified, the default behavior is `--emit=html-static-files,html-non-static-files` (i.e., full HTML documentation output, no dep-info).

### What we are not stabilizing

* Interaction between other unstable options, such as `-Zrustdoc-mergeable-info` and `--output-format=doctest`
* Available options and the default options when `--emit` not specified.
* Extension of per-type emit paths for options currently missing that.

### Motivation

#### Cargo

The primary consumer is Cargo, which needs `--emit=dep-info=<path>` to precisely track the input dependencies of a rustdoc invocation (see the [`-Zrustdoc-depinfo`] unstable Cargo feature). Without dep-info, Cargo cannot detect changes to files pulled in via `#[path = "..."]` or similar mechanisms and leads to stale documentation in incremental builds.

Cargo also uses the selective emission mechanism (`html-static-files` / `html-non-static-files`) when the unstable [`-Zrustdoc-mergeable-info`] feature is active. It skips writing shared static files and search index during per-crate doc generation and defer them to a final merge phase.

Under stable usage, Cargo passes all three emit types together.

#### docs.rs

docs.rs is the other major consumer. It uses selective emission to avoid redundantly copying toolchain-wide static files for every crate, which has historically been a source of breakage. See the tracking rust-lang/rust#83784 and the about page for more <https://docs.rs/about/download>.

### Tests

- `tests/run-make/emit-shared-files` --- Verifies selective emission of static vs non-static files.
- `tests/run-make/rustdoc-dep-info` --- Verifies dep-info generation, including explicit path and `--out-dir` interaction.
- `tests/run-make/rustdoc-scrape-examples-dep-info` --- Verifies dep-info works with scrape-examples.
- `tests/run-make/rustdoc-default-output/` --- Verifies `--help` output shows `[html-static-files,html-non-static-files,dep-info]`

[`-Zrustdoc-depinfo`]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#rustdoc-depinfo
[`-Zrustdoc-mergeable-info`]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#rustdoc-mergeable-info
2026-05-14 16:51:07 +02:00
bors 480d8520df Auto merge of #156542 - cyrgani:unbox-3, r=Nadrieril
remove `box_patterns` from remaining compiler crates

Part of https://github.com/rust-lang/rust/issues/156110.
2026-05-14 10:45:06 +00:00
Nicholas Nethercote bc127a6a4b Remove unused LintExpectationId::get_lint_index. 2026-05-14 16:28:50 +10:00
Nicholas Nethercote 530a73f17e Prevent invalid LevelSpec values
`LevelSpec` has two related fields, `level` and `lint_id`. This commit
makes the fields private (and introduces getters) to ensure they are set
together using only valid combinations.

The commit also introduces `is_allow` and `is_expect` methods because
those are useful.
2026-05-14 16:28:50 +10:00
Nicholas Nethercote f439907325 Streamline Level::from_{attr,symbol}
These methods return `Option<(Self, Option<LintExpectationId>)>`. But
all the call sites except one don't look at the
`Option<LintExpectationId>`.

This commit simplifies these methods to not return the
`Option<LintExpectationId>`. This means they no longer need to be passed
a closure to compute an `AttrId` (which is usually discarded anyway).
The commit also renames `from_attr` as `from_opt_symbol`, because it
takes an `Option<Symbol>`, not an `Attribute`.

These changes simplify all the call sites that don't need the
`Option<LintExpectationId>`, and also the one call site that does (in
`LintLevelsBuilder::add`): that call site no longer needs to do an
awkward destructuring, and can instead build the appropriate
`LintExpectationId` directly.
2026-05-14 16:28:50 +10:00
bors 1a70f8d36e Auto merge of #156561 - jieyouxu:rollup-l3kXdVY, r=jieyouxu
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#156450 (compiletest: Enforce that directives are consistently used with or without a colon)
 - rust-lang/rust#156531 (compiletest: Rename `//@ ignore-pass` to `//@ no-pass-override`)
2026-05-14 05:24:52 +00:00
许杰友 Jieyou Xu (Joe) 76d07a61f3 Rollup merge of #156531 - Zalathar:no-pass-override, r=jieyouxu
compiletest: Rename `//@ ignore-pass` to `//@ no-pass-override`

By convention, compiletest directives starting with `ignore-*` normally cause the test itself to be skipped under certain conditions.

The `//@ ignore-pass` directive was the only exception to that convention. The new name should hopefully do a better job of communicating its effect, which is to cause the `--pass` flag to not override the test's `build-pass` or `run-pass` directive.

The `//@ no-pass-override` directive is mainly useful for tests that expect warnings produced during codegen.

---
r? jieyouxu
2026-05-14 13:24:34 +08:00
许杰友 Jieyou Xu (Joe) 772f42b5b7 Rollup merge of #156450 - Zalathar:colon-or-not, r=jieyouxu
compiletest: Enforce that directives are consistently used with or without a colon

With the notable exception of `//@ pp-exact`, all directives expect to either always be used *with* a colon, or always be used *without* a colon. For example:

- `//@ uses-colon: value`
- `//@ no-colon` or `//@ no-colon (remark)`

Currently we just silently discard directives that use the wrong syntax, which is not great.

This PR therefore makes `parse_name_directive` and `parse_name_value_directive` panic if the wrong syntax is encountered.

The parser for `pp-exact` has been adjusted to check for the colon before deciding which parse method to call.

r? jieyouxu
2026-05-14 13:24:33 +08:00
Nicholas Nethercote f9fd7f76f2 Rename DeadItem::level
The name is misleading because the field contains a `Level` *and* an
`Option<LintExpectationId>`. This commit renames it `level_plus` which
better communicates that it's more than just a level.
2026-05-14 13:20:59 +10:00
Nicholas Nethercote ccfac5469a Rename LevelAndSource
It is misnamed, given that it has three fields: `level`, `lint_id`, and
`src`. (Presumably the `lint_id` was added later.)

This commit renames it as `LevelSpec`. (I also considered `LevelInfo`
but that's very generic. `Spec` has pre-existing uses in
`LintLevelsProvider::current_specs` and `LintSet::specs` and
`ShallowLintLevelMap::specs`.)

Related things renamed as well:
- `level` -> `level_spec` (where appropriate)
- `lint_levels` -> `lint_level_specs`
- `get_lint_level` -> `get_lint_level_spec`
- `level_and_source` -> `level_spec`
- `CodegenLintLevels` -> `CodegenLintLevelSpecs`
- `raw_lint_id_level` -> `raw_lint_level_spec`
- `lint_level_at_node` -> `lint_level_spec_at_node`
- `reveal_actual_level` -> `reveal_actual_level_spec`
- `probe_for_lint_level` -> `probe_for_lint_level_spec`

This clears up a lot of `Level` vs. `LevelSpec` ambiguity. E.g. no more
`level.level` expressions.
2026-05-14 13:20:57 +10:00
bors c85af1c5ed Auto merge of #156559 - JonathanBrouwer:rollup-WZRJhi0, r=JonathanBrouwer
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#156552 (Clippy subtree update)
 - rust-lang/rust#156344 (Do not index past end of buffer when checking heuristic in error index syntax highlighter)
 - rust-lang/rust#156500 (Privacy: move macros handling to early stage)
 - rust-lang/rust#156260 (test: suppress deprecation warning)
 - rust-lang/rust#156413 (rustdoc: Correctness & perf improvements to link-to-definition)
 - rust-lang/rust#156539 (Add `ChildExt::kill_process_group`)
 - rust-lang/rust#156540 (use `deref_patterns` in `rustdoc` instead of `box_patterns`)
2026-05-14 01:30:22 +00:00
Jonathan Brouwer be6fdeed82 Rollup merge of #156540 - cyrgani:unbox-rustdoc, r=GuillaumeGomez
use `deref_patterns` in `rustdoc` instead of `box_patterns`

Part of https://github.com/rust-lang/rust/issues/156110.
2026-05-14 00:35:40 +02:00
Jonathan Brouwer 6ed876094c Rollup merge of #156539 - jmillikin:unix-childext-killpg, r=nia-e
Add `ChildExt::kill_process_group`

ACP: https://github.com/rust-lang/libs-team/issues/791
Tracking issue: https://github.com/rust-lang/rust/issues/156537
2026-05-14 00:35:39 +02:00
Jonathan Brouwer 0f950ce670 Rollup merge of #156413 - fmease:rustdoc-ltd-improvs, r=GuillaumeGomez
rustdoc: Correctness & perf improvements to link-to-definition

Rewrite the way we resolve type-dependent paths (incl. method calls) in `SpanMapVisitor`. Instead of trying to (re)find the enclosing body owner each time we encounter such a node, potentially calling `typeck_body` several times per body, keep track of the "active" `BodyId` in the visitor and cache the corresponding `TypeckResults`. The "active" `BodyId` is updated in `visit_nested_body` (add) and in `visit_item` (remove).

This fixes a class of ICEs where we tried to look up the definition of type-relative paths located in non-body items nested in bodies, in the overarching body which is never correct. rustdoc@main has a hack to fix this issue for paths specifically found in assoc types in impls.

Fixes rust-lang/rust#147882. Fixes rust-lang/rust#147057. Fixes rust-lang/rust#155327. Fixes rust-lang/rust#149089. Fixes rust-lang/rust#150153. Fixes rust-lang/rust#156418.
Supersedes rust-lang/rust#147911.

---

`--generate-link-to-definition` is not enabled by default, so we can't perf this as is. Instead, I'm benching them against PR rust-lang/rust#156348 in PR https://github.com/rust-lang/rust/pull/156355 using the same parent commit for the try-builds. For context, LTD is *extremely* costly as the perf run for the baseline PR shows: https://github.com/rust-lang/rust/pull/156348#issuecomment-4411427326.

"Absolute results": https://github.com/rust-lang/rust/pull/156355#issuecomment-4421922342.
"Relative results": [https://perf.rust-lang.org/compare.html?...](https://perf.rust-lang.org/compare.html?start=68c2bff6cb08a87e59246064a6a9f37098e22c3f&end=78d15de5525370011388c8f63847e873c4de14ed&stat=instructions%3Au).

Excerpt of the relative results:

Primary:

Benchmark | Profile | Scenario | Backend | Target | % Change | Significance Threshold | Significance Factor
---|---|---|---|---|---|---|---
nalgebra-0.33.0 | doc | full | llvm | x64 | -5.82% | 0.20% | 29.09x
diesel-2.2.10 | doc | full | llvm | x64 | -3.41% | 0.20% | 17.05x
image-0.25.6 | doc | full | llvm | x64 | -2.03% | 0.20% | 10.16x
regex-automata-0.4.8 | doc | full | llvm | x64 | -1.94% | 0.20% | 9.71x
cargo-0.87.1 | doc | full | llvm | x64 | -1.64% | 0.20% | 8.21x
clap_derive-4.5.32 | doc | full | llvm | x64 | -1.63% | 0.20% | 8.14x
cranelift-codegen-0.119.0 | doc | full | llvm | x64 | -1.48% | 0.20% | 7.41x
syn-2.0.101 | doc | full | llvm | x64 | -1.07% | 0.20% | 5.35x
ripgrep-14.1.1 | doc | full | llvm | x64 | -0.96% | 0.20% | 4.78x
stm32f4-0.15.1 | doc | full | llvm | x64 | -0.80% | 0.20% | 4.01x
serde-1.0.219 | doc | full | llvm | x64 | -0.67% | 0.20% | 3.33x
hyper-1.6.0 | doc | full | llvm | x64 | -0.66% | 0.20% | 3.30x
eza-0.21.2 | doc | full | llvm | x64 | -0.55% | 0.20% | 2.74x
unicode-normalization-0.1.24 | doc | full | llvm | x64 | -0.49% | 0.20% | 2.45x
serde_derive-1.0.219 | doc | full | llvm | x64 | -0.45% | 0.20% | 2.26x
typenum-1.18.0 | doc | full | llvm | x64 | -0.42% | 0.20% | 2.08x
bitmaps-3.2.1 | doc | full | llvm | x64 | -0.32% | 0.20% | 1.61x

Secondary:

Benchmark | Profile | Scenario | Backend | Target | % Change | Significance Threshold | Significance Factor
---|---|---|---|---|---|---|---
deep-vector | doc | full | llvm | x64 | -23.96% | 0.20% | 119.78x
large-workspace | doc | full | llvm | x64 | -2.16% | 0.20% | 10.81x
deeply-nested-multi | doc | full | llvm | x64 | -1.35% | 0.20% | 6.75x
serde-1.0.219-threads4 | doc | full | llvm | x64 | -0.67% | 0.20% | 3.33x
wg-grammar | doc | full | llvm | x64 | -0.32% | 0.20% | 1.62x
tt-muncher | opt | full | llvm | x64 | -0.31% | 0.20% | 1.56x

nalgebra-0.33.0:

Query/Function | Time (%) | Time (s) | Time delta | Executions | Executions delta | Hits | Hits delta
---|---|---|---|---|---|---|---
Totals | 109.57% | 2.185 | -0.138 (-5.9%) | 1614146 | -5602 (-0.3%) | 16983840 | -1436455 (-7.8%)
typeck_root | 15.75% | 0.344 | -0.105 (-23.4%) | 1704 | -954 (-35.9%) | 393 | -6758 (-94.5%)
...|...|...|...|...|...|...|...
2026-05-14 00:35:38 +02:00
Jonathan Brouwer 5d63c29471 Rollup merge of #156260 - ZequanWu:fix-ld-warn, r=JohnTitor
test: suppress deprecation warning

The newer mac os ld linker emits a deprecation warning:
```
 warning: linker stderr: ld: -ld_classic is deprecated and will be removed in a future release
    |
    = note: `#[warn(linker_messages)]` on by default
```
2026-05-14 00:35:37 +02:00
Jonathan Brouwer 604d124199 Rollup merge of #156500 - Bryanskiy:macros_vis, r=petrochenkov
Privacy: move macros handling to early stage

The patch moves effective visibility computation for macros from `rustc_privacy` to `rustc_resolve`. It will enable this optimization: https://github.com/rust-lang/rust/pull/156228.

However, I found some problems with macro handling while I was doing this. The current implementation was written ~6 years ago and checks the reachability of a definition from a macro by nominal visibility. In general this is incorrect.

For example, in the current implementation modules are not traversed if their nominal visibility is less then the nominal visibility of a module defining macro: https://github.com/rust-lang/rust/blob/29b7590130c83542a095cdf1323ed0f78eec2bb8/compiler/rustc_privacy/src/lib.rs#L618-L626

As a result, in order to compile code like  `tests/ui/definition-reachable/auxiliary/field-method-macro.rs`. we have to additionally traverse types of adt fields: https://github.com/rust-lang/rust/blob/29b7590130c83542a095cdf1323ed0f78eec2bb8/compiler/rustc_privacy/src/lib.rs#L628-L638

This is a hack and the proper solution would be to check definitions with `EffectiveVisibilities::is_reachable`. I haven’t done this yet, as it would start to trigger many lints as more items become reachable. I think it’s better to leave the change to another commit.

r? @petrochenkov
2026-05-14 00:35:36 +02:00
Jonathan Brouwer f24b05a9d2 Rollup merge of #156344 - estebank:issue-156326, r=petrochenkov
Do not index past end of buffer when checking heuristic in error index syntax highlighter

When checking whether the current token is a function indentifier by inspecting the syntax, do not attempt to access past the end of the code buffer.

Fix rust-lang/rust#156326.
2026-05-14 00:35:36 +02:00
Jonathan Brouwer 0eeba4bccd Rollup merge of #156552 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? Manishearth

`Cargo.lock` update due to patch version bump in `ui_test`.

One day early, as I won't have access to my laptop from tomorrow till Sunday
2026-05-14 00:35:35 +02:00
cyrgani d5f8ddf14c use deref_patterns in rustc_mir_transform 2026-05-13 19:47:14 +00:00
cyrgani 8d2116e035 use deref_patterns in rustc_mir_dataflow 2026-05-13 19:45:13 +00:00
cyrgani 441ef9eb4f use deref_patterns in rustc_mir_build 2026-05-13 19:45:12 +00:00
bors ff9a9ea07b Auto merge of #138995 - oli-obk:split-resolver, r=petrochenkov
Split the node_id_to_def_id table into a per-owner table

*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/138995)*

My goal is to split all the resolver tables that get passed to act lowering into per-owner tables, so that all information that ast lowering needs from the resolver is separated by owners. This should allow us to fully split ast lowering to have one query invocation per owner that steal the individual resolver results for each owner.

part of https://github.com/rust-lang/rust-project-goals/issues/620
2026-05-13 19:02:46 +00:00
Philipp Krones 4e3fe3ed28 Update Cargo.lock 2026-05-13 19:53:10 +02:00
Philipp Krones 30e15b541f Merge commit 'b147b68c9bbc5ad44aea4220e6f68fd281f19c64' into clippy-subtree-update 2026-05-13 19:52:47 +02:00
Esteban Küber 530c69bbc2 Do not index past end of buffer when checking heuristic in error index syntax highlighter
When checking whether the current token is a function indentifier by inspecting the syntax, do not attempt to access past the end of the code buffer.
2026-05-13 17:52:04 +00:00
Philipp Krones b147b68c9b Rustup (#17009)
r? @ghost

changelog: none
2026-05-13 17:26:04 +00:00
Philipp Krones 0f05543124 Bump nightly version -> 2026-05-13 2026-05-13 19:18:47 +02:00
Philipp Krones d0611d8263 Merge remote-tracking branch 'upstream/master' into rustup 2026-05-13 19:18:36 +02:00
Bryanskiy 3d0ee528cb Privacy: move macros handling to early stage 2026-05-13 20:04:42 +03:00
bors 800892799d Auto merge of #156546 - JonathanBrouwer:rollup-5MJf3XL, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#155815 (Add Swift function call ABI)
 - rust-lang/rust#156425 (Fix unused assignments in diverging branches)
 - rust-lang/rust#156536 (`reveal_actual_level` improvements)
 - rust-lang/rust#156543 (Update rustbook dependencies to remove windows-targets dependency)
2026-05-13 13:52:48 +00:00
John Millikin 7bf5fe7bf8 Add ChildExt::kill_process_group
This function wraps POSIX `killpg(pid, SIGKILL)`, and on Linux
additionally may be implemented by `pidfd_send_signal`.
2026-05-13 22:39:57 +09:00
Jonathan Brouwer ea715cbaba Rollup merge of #156543 - bjorn3:rustbook_windows_sys_0_61, r=ehuss
Update rustbook dependencies to remove windows-targets dependency

Part of https://github.com/rust-lang/rust/issues/156459
2026-05-13 15:16:20 +02:00
Jonathan Brouwer 68e98f0d40 Rollup merge of #156536 - nnethercote:reveal_actual_level-improvements, r=GuillaumeGomez
`reveal_actual_level` improvements

Details in individual commits.

r? @GuillaumeGomez
2026-05-13 15:16:19 +02:00
Jonathan Brouwer aeae08587c Rollup merge of #156425 - chenyukang:yukang-fix-156416-unused-assignments-diverging, r=oli-obk
Fix unused assignments in diverging branches

Fixes rust-lang/rust#156416

Add `location` and use `is_predecessor_of` to check in the control flow graph.

r? @ghost
I'd like to see whether there is performence regression.
2026-05-13 15:16:18 +02:00
Jonathan Brouwer 0705b602f0 Rollup merge of #155815 - djc:swift-cc, r=jieyouxu
Add Swift function call ABI

Adds an unstable `extern "Swift"` ABI behind the `abi_swift` feature gate, mapping to LLVM's `swiftcc` calling convention. This is only allowed (a) for `is_darwin_like` targets, since the [ABI is only stable for those platforms](https://www.swift.org/blog/abi-stability-and-more/) and (b) with the LLVM backend, since the other backends don't support it.

Current approaches to interoperability with Swift lower to Objective-C (or require a Swift stub exposing a C ABI), but that is an optional mapping on the Swift side that some newer Apple frameworks omit. It would be great to be able to more directly/natively be able to call into Swift code directly via its stable API (on Apple platforms at least).

Reimplements rust-lang/rust#64582 on top of current main. The main objection to the previous PR seemed to be that it needed an RFC, but there was pushback (which seems sensible to me) that an RFC could be deferred until stabilization.

I think this needs a tracking issue? Would be happy to write one up if/when there is a consensus that this will be merged.
2026-05-13 15:16:17 +02:00
bjorn3 56e973fa08 Update rustbook dependencies to remove windows-targets dependency 2026-05-13 13:20:33 +02:00
cyrgani 6e99c68516 use deref_patterns in rustdoc 2026-05-13 10:57:41 +00:00
John Millikin 2c30279ff6 Add send_process_group_signal to existing unix_send_signal feature
This function wraps POSIX `killpg()`, and on Linux additionally
may be implemented by `pidfd_send_signal`.
2026-05-13 19:41:14 +09:00
bors eab3d97764 Auto merge of #156535 - JonathanBrouwer:rollup-9oxBSQK, r=JonathanBrouwer
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#156472 (Add support for Zprint-codegen-stats-json)
 - rust-lang/rust#156504 (bootstrap: remap windows-style OUT_DIR paths)
 - rust-lang/rust#156513 (miri subtree update)
 - rust-lang/rust#156524 (Remove the dummy `PreCodegen` mir-opt pass, and use `runtime-optimized` instead)
 - rust-lang/rust#156325 (Don't treat const param default as projection)
2026-05-13 09:57:02 +00:00
Nicholas Nethercote b86ef89082 Change reveal_actual_level's closure's return type, again
Again, the returned triple is equivalent to `LevelAndSource`.
2026-05-13 19:54:30 +10:00
Nicholas Nethercote 7cd42a77fb Change reveal_actual_level's closure's return type
It's currrently `(Option<(Level, Option<LintExpectationId>)>,
LintLevelSource)`. But when the first element of the pair is `None` the
second element is always `LintLevelSource::Default`. So this commit
moves the `LintLevelSource` within the `Option`, which simplifies
things a bit.
2026-05-13 19:54:30 +10:00
Nicholas Nethercote 202e86102c Change reveal_actual_level return type
It currently returns a triple: `(Level, Option<LintExpectationId>,
LintLevelSource)`. That's structurally identical to `LevelAndSource`, so
this commit changes it accordingly.
2026-05-13 19:54:30 +10:00
Nicholas Nethercote 9de0b2dd65 Improve reveal_actual_level
`reveal_actual_level` has two call sites, which look like this:
```
let (level, mut src) = self.raw_lint_id_level(lint, idx, aux);
let (level, lint_id) = reveal_actual_level(level, &mut src, sess, lint, |id| {
    self.raw_lint_id_level(id, idx, aux)
});
```
and:
```
let (level, mut src) = self.probe_for_lint_level(tcx, lint, cur);
let (level, lint_id) = reveal_actual_level(level, &mut src, tcx.sess, lint, |lint| {
    self.probe_for_lint_level(tcx, lint, cur)
});
```
They both have the same pattern: there's a prior call expression that is then
repeated within a closure passed to `reveal_actual_level`.

This commit moves that prior call inside `reveal_actual_level`, making things
simpler.
2026-05-13 19:54:28 +10:00
Jonathan Brouwer f6faa05477 Rollup merge of #156325 - cijiugechu:generics-transmutefrom, r=BoxyUwU
Don't treat const param default as projection

Avoid treating const param default as associated const projection.

Closes rust-lang/rust#156293
2026-05-13 11:46:41 +02:00
Jonathan Brouwer c978cbebea Rollup merge of #156524 - Zalathar:no-pre-codegen, r=oli-obk
Remove the dummy `PreCodegen` mir-opt pass, and use `runtime-optimized` instead

- Alternative to https://github.com/rust-lang/rust/pull/156358.

The `PreCodegen` pass doesn't do anything on its own; it was only serving as a marker to allow `-Zdump-mir` and mir-opt tests to easily dump the final MIR just before codegen.

However, https://github.com/rust-lang/rust/pull/156358#issuecomment-4422445297 pointed out that the `runtime-optimized` phase transition should dump the same MIR, so there shouldn't be any need for a separate *PreCodegen* pass.

---
r? oli-obk (or compiler)
2026-05-13 11:46:40 +02:00
Jonathan Brouwer 91b85f6119 Rollup merge of #156513 - RalfJung:miri, r=RalfJung
miri subtree update

Unblocks https://github.com/rust-lang/rust/pull/156493.

---

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/f2730828d60db345864d49d7ab253b796e9948e1.

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

r? @ghost
2026-05-13 11:46:39 +02:00