Skip to content

Rollup of 18 pull requests #139612

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

Closed
wants to merge 45 commits into from
Closed

Conversation

Zalathar
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

GuillaumeGomez and others added 30 commits March 7, 2025 17:09
Currently the code continues, using an empty path, but it doesn't need
to.
`resolve_ident_in_lexical_scope` checks for an empty name. Why is this
necessary? Because `parse_item_impl` can produce an `impl` block with an
empty trait name in some cases. This is pretty gross and very
non-obvious.

This commit avoids the use of the empty trait name. In one case the
trait name is instead pulled from `TyKind::ImplTrait`, which prevents
the output for `tests/ui/impl-trait/extra-impl-in-trait-impl.rs` from
changing. In the other case we just fail the parse and don't try to
recover. I think losing error recovery in this obscure case is worth
the code cleanup.

This change affects `tests/ui/parser/impl-parsing.rs`, which is split in
two, and the obsolete `..` syntax cases are removed (they are tested
elsewhere).
We should enable these to avoid misinterpreting uses of the extended
syntax as code blocks. This happens in practice with multi-paragraph
footnotes, as discovered in rust-lang#139064.
In `swap_nonoverlapping_short` there's a new `debug_assert!`, and if that's enabled then the `alloca`s don't optimize out.
Inspired by some of the communication issues around the stabilization of
`let`-chains, give more fine-grained information about the status of
updating style for any new syntax.

This does not change the process or blockers in any way; it only
*documents* the current state in the tracking issue. For instance, in
the case of `let`-chains, we would have checked the boxes for "Style
team decision" and "(non-blocking) Formatting has been implemented", and
not checked the box for the style guide. That would have then provided
better supporting information for any decisions.
Includes the following changes:

* Avoid OOB access in `memcpy` and `memmove` [1]
* Enable intrinsics on AVR [2]
* `libm` updates to avoid using `core::arch` vector intrinsics [3]

[1]: rust-lang/compiler-builtins#799
[2]: rust-lang/compiler-builtins#791
[3]: rust-lang/compiler-builtins#814
Ensure `swap_nonoverlapping` is really always untyped

This replaces rust-lang#134954, which was arguably overcomplicated.

## Fixes rust-lang#134713

Actually using the type passed to `ptr::swap_nonoverlapping` for anything other than its size + align turns out to not work, so this goes back to always erasing the types down to just bytes.

(Except in `const`, which keeps doing the same thing as before to preserve `@RalfJung's` fix from rust-lang#134689)

## Fixes rust-lang#134946

I'd previously moved the swapping to use auto-vectorization *on bytes*, but someone pointed out on Discord that the tail loop handling from that left a whole bunch of byte-by-byte swapping around.  This goes back to manual tail handling to avoid that, then still triggers auto-vectorization on pointer-width values.  (So you'll see `<4 x i64>` on `x86-64-v3` for example.)
…pper-improvement, r=camelid

Small code improvement in rustdoc hidden stripper

This is a very minor code improvement following rust-lang#137534. It doesn't change anything about the performance issue.

r? `@notriddle`
…Gomez

Clean up librustdoc::html::render to be better encapsulated

Closes rust-lang#138567
rustdoc: Enable Markdown extensions when looking for doctests

Fixes rust-lang#139064.

We should enable these to avoid misinterpreting uses of the extended
syntax as code blocks. This happens in practice with multi-paragraph
footnotes, as discovered in rust-lang#139064.
…viscross

Tracking issue template: fine-grained information on style update status

Inspired by some of the communication issues around the stabilization of
`let`-chains, give more fine-grained information about the status of
updating style for any new syntax.

This does not change the process or blockers in any way; it only
*documents* the current state in the tracking issue. For instance, in
the case of `let`-chains, we would have checked the boxes for "Style
team decision" and "(non-blocking) Formatting has been implemented", and
not checked the box for the style guide. That would have then provided
better supporting information for any decisions.
Update `compiler-builtins` to 0.1.153

Includes the following changes:

* Avoid OOB access in `memcpy` and `memmove` [1]
* Enable intrinsics on AVR [2]
* `libm` updates to avoid using `core::arch` vector intrinsics [3]

[1]: rust-lang/compiler-builtins#799
[2]: rust-lang/compiler-builtins#791
[3]: rust-lang/compiler-builtins#814
…r=compiler-errors

Update compiletest to Edition 2024

r? bootstrap (or compiler)
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc 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. rollup A PR which is a rollup labels Apr 10, 2025
@Zalathar
Copy link
Contributor Author

Jumbo rollup to quickly flush out unknown problems from anywhere in the queue.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 10, 2025

📌 Commit e43645e has been approved by Zalathar

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 Apr 10, 2025
@bors
Copy link
Collaborator

bors commented Apr 10, 2025

⌛ Testing commit e43645e with merge 2bec972...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2025
Rollup of 18 pull requests

Successful merges:

 - rust-lang#137412 (Ensure `swap_nonoverlapping` is really always untyped)
 - rust-lang#138167 (Small code improvement in rustdoc hidden stripper)
 - rust-lang#138605 (Clean up librustdoc::html::render to be better encapsulated)
 - rust-lang#138682 (Allow drivers to supply a list of extra symbols to intern)
 - rust-lang#138904 (Test linking and running `no_std` binaries)
 - rust-lang#139423 (Suppress missing field error when autoderef bottoms out in infer)
 - rust-lang#139449 (match ergonomics: replace `peel_off_references` with a recursive call)
 - rust-lang#139507 (compiletest: Trim whitespace from environment variable names)
 - rust-lang#139530 (Remove some dead or leftover code related to rustc-intrinsic abi removal)
 - rust-lang#139560 (fix title of offset_of_enum feature)
 - rust-lang#139563 (emit a better error message for using the macro incorrectly)
 - rust-lang#139568 (Don't use empty trait names)
 - rust-lang#139580 (Temporarily leave the review rotation)
 - rust-lang#139589 (saethlin is back from vacation)
 - rust-lang#139592 (rustdoc: Enable Markdown extensions when looking for doctests)
 - rust-lang#139599 (Tracking issue template: fine-grained information on style update status)
 - rust-lang#139600 (Update `compiler-builtins` to 0.1.153)
 - rust-lang#139606 (Update compiletest to Edition 2024)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-apple-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking compiletest v0.0.0 (/Users/runner/work/rust/rust/src/tools/compiletest)
error[E0133]: call to unsafe function `libc::sysctl` is unsafe and requires unsafe block
  --> src/tools/compiletest/src/raise_fd_limit.rs:24:8
   |
24 |     if libc::sysctl(&mut mib[0], 2, &mut maxfiles as *mut _ as *mut _, &mut size, null_mut(), 0)
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior
note: an unsafe function restricts its caller, but its body is safe by default
  --> src/tools/compiletest/src/raise_fd_limit.rs:9:1
   |
9  | pub unsafe fn raise_fd_limit() {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `-D unsafe-op-in-unsafe-fn` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unsafe_op_in_unsafe_fn)]`

error[E0133]: call to unsafe function `libc::getrlimit` is unsafe and requires unsafe block
  --> src/tools/compiletest/src/raise_fd_limit.rs:33:8
   |
33 |     if libc::getrlimit(libc::RLIMIT_NOFILE, &mut rlim) != 0 {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function `libc::setrlimit` is unsafe and requires unsafe block
  --> src/tools/compiletest/src/raise_fd_limit.rs:44:12
   |
44 |         if libc::setrlimit(libc::RLIMIT_NOFILE, &rlim) != 0 {
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
   |
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html>
   = note: consult the function's documentation for information on how to avoid undefined behavior

@bors
Copy link
Collaborator

bors commented Apr 10, 2025

💔 Test failed - checks-actions

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

due to compiletest 2024 upgrade i think

@Zalathar Zalathar deleted the rollup-7twdm9m branch April 10, 2025 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.