Skip to content

Rollup of 13 pull requests #142613

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

Merged
merged 32 commits into from
Jun 17, 2025
Merged

Rollup of 13 pull requests #142613

merged 32 commits into from
Jun 17, 2025

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Jun 17, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xizheyin and others added 30 commits June 4, 2025 01:39
Streamlined the explanation of covariance for `NonNull<T>`,
focusing on practical usage and reducing scary explanation.
Added a concise example for cases where invariance is required,
showing how to use `PhantomData<Cell<T>>

Signed-off-by: xizheyin <[email protected]>
In particular, there should be no additional errors (default field
values for `union` fields are currently erroneously accepted).
more information to Display implementation for BorrowError/BorrowMutError

- The BorrowError/BorrowMutError Debug implementations do not print
anything differently from what the derived implementation does, so we
don't need it.

- This change also adds the location field of
BorrowError/BorrowMutError to the the Display output when it is
present, rewords the error message, and uses the Display trait for
outputting the error message instead of Debug.
It's actually used as a counter so update the name to reflect that.
In a PR to emit warnings on misuse of `--print native-static-libs`,
we did not consider the matter of composing parts of build systems.
If you are not directly invoking rustc, it can be difficult to know
when you will in fact compile a staticlib, so making sure everyone
uses `--print native-static-lib` correctly can be just a nuisance.

This reverts the following commits:
- f66787a
- 72a9219
- 98bb597
- c59b708

Next cycle we can reland a slightly more narrowly focused variant or one
that focuses on `--emit` instead of `--print native-static-libs`.
But in its current state, I am not sure the warning is very useful.
This minimizes the chance of two PRs changing it from N to N+1.
Make performance description of String::{insert,insert_str,remove} more precise
std: refactor explanation of `NonNull`

Fixes rust-lang#141933

I cut out the excessive explanation and used an example to explain how to maintain invariance, but I think what is quoted in the *rust reference* in the document needs to be added with a more layman's explanation and example.

(I'm not sure if I deleted too much)

r? `@workingjubilee`
Miscellaneous RefCell cleanups

- Clarify `RefCell` error messages when borrow rules are broken
- Remove `Debug` impl for `BorrowError`/`BorrowMutError` since `#derive(Debug)` provides identical functionality
- Rename `BorrowFlag` to `BorrowCounter`
…r=SparrowLii

Manually invalidate caches in SimplifyCfg.

The current `SimplifyCfg` pass unconditionally invalidates CFG caches. This is unfortunate if there are no modifications that require this invalidation.
…i865

Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism

Closes rust-lang#128911. This PR *re-enables* the `dump-ice-to-disk` test and the unstable feature usage metrics tests for {x86_64,i686} Windows MSVC hosts and x86_64 Windows GNU host. I'll keep an eye out for these tests, and will broaden the ignores if this test is still flaky on not just `i686-pc-windows-gnu`.

r? mati865

try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
Reject union default field values

Fixes rust-lang#142555.

The [`default_field_values` RFC][rfc] does not specify that default field values may be used on `union`s, and it's not clear how default field values may be used with `union`s without an design extension to the RFC. So, for now, reject trying to use default field values with `union`s.

### Review notes

- The first commit adds the `union` with default field values test case to `tests/ui/structs/default-field-values/failures.rs`, where `union`s with default field values are currently accepted.
- The second commit rejects trying to supply default field values to `union` definitions.
- When `default_field_values` feature gate is disabled, we show the feature gate error when the user tries to write `union`s with default field values. When the feature gate is enabled, we reject this usage with
   > unions cannot have default field values

``@rustbot`` label: +F-default_field_values

[rfc]: https://rust-lang.github.io/rfcs/3681-default-field-values.html
Handle same-crate macro for borrowck semicolon suggestion

Handles rust-lang#142543 (comment)

cc ``@m-ou-se``
r? ``@fmease``
Update books

## rust-lang/book

1 commits in 634724ea85ebb08a542970bf8871ac8b0f77fd15..4433c9f0cad8460bee05ede040587f8a1fa3f1de
2025-06-03 16:34:00 UTC to 2025-06-03 16:34:00 UTC

- Chapter 11 from tech review (rust-lang/book#4391)

## rust-lang/reference

10 commits in 8e0f593a30f3b56ddb0908fb7ab9249974e08738..d4c66b346f4b72d29e70390a3fa3ea7d4e064db1
2025-06-13 17:05:11 UTC to 2025-06-03 21:28:42 UTC

- Align pattern destructuring with rest of patterns documentation (rust-lang/reference#1853)
- Use extern "system" instead of "stdcall" in example (rust-lang/reference#1854)
- Mention that `thiscall` is a 32-bit calling convention (rust-lang/reference#1855)
- Add doc for keylocker target features (rust-lang/reference#1829)
- Add doc for `sha512`, `sm3` and `sm4` target features (rust-lang/reference#1830)
- Fix(typo): 'though' should be 'through' (rust-lang/reference#1850)
- intro note: make text more simple (rust-lang/reference#1844)
- nit: add missing period (rust-lang/reference#1843)
- add a warning about using `safe` on extern c-variadic functions (rust-lang/reference#1839)
- remove the `safe` keyword from a c-variadic foreign function. (rust-lang/reference#1838)

## rust-lang/rust-by-example

3 commits in 21f4e32b8b40d36453fae16ec07ad4b857c445b6..9baa9e863116cb9524a177d5a5c475baac18928a
2025-06-11 13:00:27 UTC to 2025-06-10 12:43:14 UTC

- introduce new ``@media`` query to set a higher content width on ultra wide screens (rust-lang/rust-by-example#1937)
- Fix syntax highligting (rust-lang/rust-by-example#1935)
- fix(rust-lang#1656): update doc tests to use `playground` as the crate name (rust-lang/rust-by-example#1934)
…t-field-def, r=fmease

Fold unnecessary `visit_struct_field_def` in AstValidator

We don't need it anymore since we removed the `_: struct { }` syntax experiment.
…lds, r=jieyouxu

Make sure to propagate result from `visit_expr_fields`

We weren't propagating the `ControlFlow::Break` out of a struct field, which means that the solution implemented in rust-lang#130443 didn't work for nested fields.

Fixes rust-lang#142525.
…39, r=ChrisDenton

Revert overeager warning for misuse of `--print native-static-libs`

In a PR to emit warnings on misuse of `--print native-static-libs`, we did not consider the matter of composing parts of build systems. If you are not directly invoking rustc, it can be difficult to know when you will in fact compile a staticlib, so making sure uses `--print native-static-lib` correctly can be just a nuisance.

Next cycle we can reland a slightly more narrowly focused variant or one that focuses on `--emit` instead of `--print native-static-libs`. But in its current state, I am not sure the warning is very useful.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. rollup A PR which is a rollup labels Jun 17, 2025
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 17, 2025

📌 Commit 68ebae9 has been approved by workingjubilee

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 Jun 17, 2025
@workingjubilee
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 17, 2025
@workingjubilee
Copy link
Member Author

@bors2 try jobs=dist-apple-various

@rust-bors
Copy link

rust-bors bot commented Jun 17, 2025

⌛ Trying commit 68ebae9 with merge 69b2373

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 17, 2025
Rollup of 13 pull requests

Successful merges:

 - #138538 (Make performance description of String::{insert,insert_str,remove} more precise)
 - #141946 (std: refactor explanation of `NonNull`)
 - #142216 (Miscellaneous RefCell cleanups)
 - #142542 (Manually invalidate caches in SimplifyCfg.)
 - #142563 (Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism)
 - #142570 (Reject union default field values)
 - #142584 (Handle same-crate macro for borrowck semicolon suggestion)
 - #142585 (Update books)
 - #142586 (Fold unnecessary `visit_struct_field_def` in AstValidator)
 - #142587 (Make sure to propagate result from `visit_expr_fields`)
 - #142595 (Revert overeager warning for misuse of `--print native-static-libs`)
 - #142598 (Set elf e_flags on ppc64 targets according to abi)
 - #142601 (Add a comment to `FORMAT_VERSION`.)

r? `@ghost`
`@rustbot` modify labels: rollup
<!-- homu-ignore:start -->
[Create a similar rollup](https://bors.rust-lang.org/queue/rust?prs=138538,141946,142216,142542,142563,142570,142584,142585,142586,142587,142595,142598,142601)
<!-- homu-ignore:end -->
try-job: dist-apple-various
@workingjubilee workingjubilee marked this pull request as draft June 17, 2025 07:40
@rust-bors
Copy link

rust-bors bot commented Jun 17, 2025

☀️ Try build successful (CI)
Build commit: 69b2373 (69b2373bdd80a9a4076c59160573156a395949fe, parent: 55d436467c351b56253deeba209ae2553d1c243f)

@workingjubilee workingjubilee marked this pull request as ready for review June 17, 2025 15:19
@workingjubilee
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 17, 2025

📌 Commit 68ebae9 has been approved by workingjubilee

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 17, 2025
@bors
Copy link
Collaborator

bors commented Jun 17, 2025

⌛ Testing commit 68ebae9 with merge f3db639...

@bors
Copy link
Collaborator

bors commented Jun 17, 2025

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing f3db639 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 17, 2025
@bors bors merged commit f3db639 into rust-lang:master Jun 17, 2025
11 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 17, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 86d0aef (parent) -> f3db639 (this PR)

Test differences

Show 292 test diffs

Stage 1

  • [ui] tests/ui/print-request/emit-warning-print-link-info-without-staticlib.rs: pass -> [missing] (J1)
  • [ui] tests/ui/print-request/emit-warning-while-exe-and-print-link-info.rs: pass -> [missing] (J1)
  • errors::verify_ast_lowering_union_default_field_values_36: [missing] -> pass (J6)

Stage 2

  • [run-make] tests/run-make/dump-ice-to-disk: pass -> ignore (ignored when cross-compiling ((exercising ICE dump on host))) (J0)
  • [ui] tests/ui/print-request/emit-warning-print-link-info-without-staticlib.rs: pass -> [missing] (J2)
  • [ui] tests/ui/print-request/emit-warning-while-exe-and-print-link-info.rs: pass -> [missing] (J2)
  • [run-make] tests/run-make/unstable-feature-usage-metrics: ignore (ignored if target does not support std) -> ignore (ignored when cross-compiling ((exercises metrics dump on host))) (J3)
  • [run-make] tests/run-make/unstable-feature-usage-metrics-incremental: ignore (ignored if target does not support std) -> ignore (ignored when cross-compiling ((exercises metrics incremental on host))) (J3)
  • [run-make] tests/run-make/dump-ice-to-disk: ignore (ignored when the operating system is windows) -> pass (J4)
  • [run-make] tests/run-make/unstable-feature-usage-metrics: ignore (ignored when the operating system is windows) -> pass (J4)
  • [run-make] tests/run-make/unstable-feature-usage-metrics-incremental: ignore (ignored when the operating system is windows) -> pass (J4)
  • [run-make] tests/run-make/unstable-feature-usage-metrics: pass -> ignore (ignored when cross-compiling ((exercises metrics dump on host))) (J5)
  • [run-make] tests/run-make/unstable-feature-usage-metrics-incremental: pass -> ignore (ignored when cross-compiling ((exercises metrics incremental on host))) (J5)

Additionally, 279 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard f3db63916e541ff039ac3cd7364c2d612749b61b --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 3592.7s -> 5696.4s (58.6%)
  2. dist-aarch64-apple: 4603.6s -> 6125.5s (33.1%)
  3. i686-gnu-2: 5433.0s -> 6339.0s (16.7%)
  4. i686-gnu-1: 7132.3s -> 8289.0s (16.2%)
  5. x86_64-rust-for-linux: 2538.0s -> 2914.9s (14.9%)
  6. mingw-check-tidy: 66.8s -> 75.4s (12.8%)
  7. i686-gnu-nopt-1: 7218.7s -> 8043.7s (11.4%)
  8. x86_64-gnu-debug: 5433.6s -> 5990.5s (10.2%)
  9. aarch64-gnu-debug: 3733.2s -> 4114.9s (10.2%)
  10. x86_64-gnu-llvm-19-1: 3337.0s -> 3664.0s (9.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#138538 Make performance description of String::{insert,insert_str,… 878001e1f5856f25d483d670852c1d59fa0623d3 (link)
#141946 std: refactor explanation of NonNull 483f9ba84c9c40efccc839018c74c8f54fd1066d (link)
#142216 Miscellaneous RefCell cleanups 466322d530f8803f0f4392945f6991e74c41a0d1 (link)
#142542 Manually invalidate caches in SimplifyCfg. 4a3a6fd08e4bbace1a4e5da0fbd303a6901b3f4f (link)
#142563 Refine run-make test ignores due to unpredictable `i686-pc-… e36d27ffc067912b0ee2d63da40d5354966c13e9 (link)
#142570 Reject union default field values 52d83935b364c3919e2b051bae81e097305d8816 (link)
#142584 Handle same-crate macro for borrowck semicolon suggestion 746e56f1a4b3d02b9073e34b93ba44cc33df25b1 (link)
#142585 Update books 7da53ae54e1176e69d45d1b72ea823edbf86625b (link)
#142586 Fold unnecessary visit_struct_field_def in AstValidator 410e4dc1b702ce5054161a6f593628d0bd63cf32 (link)
#142587 Make sure to propagate result from visit_expr_fields 4a6c56ee785efcc3c4afd29f5f250cbf1083c714 (link)
#142595 Revert overeager warning for misuse of `--print native-stat… 2336e7bb0c9f80ae32f25ef3b3a32ccc321b5bf6 (link)
#142598 Set elf e_flags on ppc64 targets according to abi d9b4a5a084e1c339e2f8ba811b94e1ae7f4f51aa (link)
#142601 Add a comment to FORMAT_VERSION. d5ae6cb5f2d7dec95695a2fe7cb11c31dc275e3f (link)

previous master: 86d0aef804

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

@workingjubilee workingjubilee deleted the rollup-yuod2hg branch June 17, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-json Area: Rustdoc JSON backend 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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.