Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #137235

Merged
merged 38 commits into from
Feb 19, 2025
Merged

Rollup of 10 pull requests #137235

merged 38 commits into from
Feb 19, 2025

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

estebank and others added 30 commits January 18, 2025 23:40
Remove the word "advisory", and make it more explicit that the lock may
be advisory or mandatory depending on platform.
I had forgotten that error_index_generator is using mdbook. This moves
it to be part of the rustbook workspace so that it can share the
dependency with rustbook.
I believe this is trying to say there is something that is in the file,
but shouldn't be.
Instead of `expand_statements`. This makes the code shorter and
consistent with other MIR transform passes.

The tests require updating because there is a slight change in
MIR output:
- the old code replaced the original statement with twelve new
  statements.
- the new code inserts converts the original statement to a `nop` and
  then insert twelve new statements in front of it.

I.e. we now end up with an extra `nop`, which doesn't matter at all.
It's currently lacking comments. This commit adds some, which is useful
because there are some methods with non-obvious behaviour.

The commit also renames two things:
- `patch_map` becomes `term_patch_map`, because it's only about
  terminators.
- `is_patched` becomes `is_term_patched`, for the same reason.

(I would guess that originally `MirPatch` only handled terminators, and
then over time it expanded to allow other modifications, but these names
weren't updated.)
The previous commit removed its single use. `MirPatch` is a more
flexible alternative.
It has a single call site, and the code is clearer this way.
It has a single call site, and doesn't seem worth having as an API
function.
- group the fluent slugs together
- reword (internal-only) "too generic" error to be more in line with
  the other errors
`ty::Placeholder` is used by the trait solver and computing its layout
was necessary, because the `PointerLike` trait used to be automatically
implemented for all types with pointer-like layout.
Nowadays, `PointerLike` requires user-written impls and the trait solver
no longer computes any layouts, so this can be removed.

Unevaluated constants that aren't generic should have caused a const eval
error earlier during normalization.
- we normalize before calling `layout_of_uncached`, so we don't need to
  normalize again later
- we check for type/const errors at the top of `layout_of_uncached`, so
  we don't need to check again later
Remove the `repr` parameter from the wrappers around `calc.univariant`,
because it's always defaulted. Only ADTs can have a repr and those call
`calc.layout_of_struct_or_enum` and not `calc.univariant`.
- change function parameter order to `cx, ty, ...` to match the other
  functions in this file
- use `ct` identifier for `ty::Const` to match the majority of the
  compiler codebase
- remove useless return
- bring match arms in a more natural order
Do not ICE on default_field_value const with lifetimes

`#![feature(default_field_values)]` uses a `const` body that should be treated as inline `const`s, but is actually being detected otherwise. This is similar to the situation in rust-lang#78174, so we take the same solution: we check if the const actually comes from a field, and if it does, we use that logic to get the appropriate lifetimes and not ICE during borrowck.

Fix rust-lang#135649.
…r=GuillaumeGomez

librustdoc: more usages of `Joined::joined`

Some missed opportunities from rust-lang#136244
r? ```@GuillaumeGomez``` since you reviewed the last one (feel free to re-assign, of course 😊)
First two commits are just drive-by cleanups
Update mdbook and move error_index_generator

This moves error_index_generator to the rustbook workspace so that it can share the dependency with mdbook. I had forgotten that error_index_generator is using mdbook.

This includes a corresponding update to mdbook which avoids a regression in error_index_generator.

Closes rust-lang#137052
…on, r=compiler-errors

Improve MIR modification

A few commits that simplify code that manipulates MIR bodies.

r? `@tmiasko`
…mpiler-errors

misc `layout_of` cleanup

See individual commits for details.

r? `@oli-obk` but feel free to reassign
@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Feb 18, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Feb 18, 2025

📌 Commit bafff1b has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 18, 2025
@bors
Copy link
Contributor

bors commented Feb 18, 2025

⌛ Testing commit bafff1b with merge f44efbf...

@bors
Copy link
Contributor

bors commented Feb 19, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing f44efbf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 19, 2025
@bors bors merged commit f44efbf into rust-lang:master Feb 19, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 19, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#135711 Do not ICE on default_field_value const with lifetimes d54382e7f862a6e5f3fa4ac7827cdeb7bcbaffab (link)
#136599 librustdoc: more usages of Joined::joined a3d14e47606865067ddbcc8e27d34a45f508a03a (link)
#136876 Locking documentation updates daf052eebfe057c3d31a80089a12f5887d54ae90 (link)
#137000 Deeply normalize item bounds in new solver a8785c08af082df93c83d003c0f580d1747fa919 (link)
#137126 fix docs for inherent str constructors 790bfe8b74590f63c276167e2eb91cec0f8c9292 (link)
#137161 Pattern Migration 2024: fix incorrect messages/suggestions … b3c5cb2da46b899fb221683c562591b636f06111 (link)
#137191 Update mdbook and move error_index_generator 178ee5c4a9e73f249fe40c8c546c9fa6ce77e4bc (link)
#137203 Improve MIR modification 0ece804f43117dfd0a1b523ded475f177eb582cf (link)
#137206 Make E0599 a structured error adb4a9ea48ab4c30c581b371ff602970677e378f (link)
#137218 misc layout_of cleanup eb3bd74d345030afa0b624be72e33158533717f4 (link)

previous master: 827a0d638d

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f44efbf): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 1.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.6% [1.1%, 2.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [1.1%, 2.1%] 2

Cycles

Results (secondary 8.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
8.0% [8.0%, 8.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (secondary -0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) - - 0

Bootstrap: 774.535s -> 775.604s (0.14%)
Artifact size: 360.28 MiB -> 360.33 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.