Skip to content

Rollup of 4 pull requests - #161546

Closed
JonathanBrouwer wants to merge 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-7XOJOXH
Closed

Rollup of 4 pull requests#161546
JonathanBrouwer wants to merge 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-7XOJOXH

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

kx0101 and others added 13 commits May 5, 2026 00:34
Honor build.docs-minification=false for rustdoc suites run via
compiletest by forwarding --disable-minification to rustdoc.
A braced const argument that is a call, like `Ty<{ Ty::f() }>`, is lowered
as a tuple constructor. When the callee's self type cannot host a
tuple-variant constructor (a struct, union, primitive, or foreign type),
the call is an associated function, not a constructor, and must be wrapped
in a `const { ... }` block.

Detect that from the self type's resolution before lowering it, and emit
the existing "complex const arguments must be placed inside of a `const`
block" diagnostic. A generic struct written without its arguments, as
`tracing`'s logging macros generate, would otherwise produce a spurious
E0107 "missing generics" cascade; a primitive or foreign type would
surface an opaque "invalid base path" error.

Enums, aliases, `Self`, and type parameters are left to constructor
lowering, since each may resolve to an enum.

Add UI tests for struct, union, primitive, and foreign self types, plus
the `const { ... }`-wrapped form that compiles.
…crum

dirfd dir operations (3/4)

Previous PR: rust-lang#150679
Reference: rust-lang#139514
Tracking issue: rust-lang#120426
…157152, r=BoxyUwU

Reject non-constructor self types in const-arg tuple-call lowering

Turning on `min_generic_const_args` makes `tracing` stop compiling. Its logging macros expand a field name to something like `FieldName<{ FieldName::len(stringify!(field)) }>`, and under mgca a braced call in const-arg position gets lowered as a tuple constructor. So lowering tries to resolve the bare self type `FieldName` (written without its `const N`), which kicks off an `E0107 "missing generics"` cascade pointing deep into macro code. But `FieldName::len(..)` is just an associated fn, not a constructor, so lowering it like a `TupleCall` was wrong in the first place. See rust-lang#157152.

Only an enum can host a tuple-variant ctor, so for any other self type that can't (struct, union, primitive, foreign type) the call has to be an assoc fn and needs wrapping in `const { ... }`. We catch those from the self type's resolution before lowering it and emit the existing "complex const arguments must be placed inside of a `const` block" error, which is the message you'd want anyway. Enums, aliases, `Self` and type params get left alone since they might resolve to an enum. tbh the bare generic *enum* case (`Option::Some(0)`) still E0107s, and imo that's better as a follow-up since catching it needs the variant type before lowering. Tests cover struct/union/primitive/foreign plus the wrapped forms that compile, and I checked it against the real `tracing` 0.1.44 crate too.

_fwiw just the code changes and tests were implemented with AI help and I verified/reproduced/tested everything locally before sending to remote._
…rward-disable-minification, r=lolbinarycat

compiletest: forward disable-minification from bootstrap

`build.docs-minification = false` was already honored when building docs through bootstrap's doc steps, but compiletest-driven rustdoc suites always generated minified CSS/JS.

Bootstrap now forwards `--disable-minification` to compiletest when docs minification is disabled, and compiletest passes `-Zunstable-options --disable-minification` to rustdoc for HTML/JS/JSON/UI doc generation.

Fixes rust-lang#142737.
…, r=Mark-Simulacrum

feat: add symmetric PartialEq impls for Vec, &[T], &mut [T] versus Cow<'_, [T]>

add the missing reverse `PartialEq<Cow<'_, [U]>>` impls for `Vec<T, A>`, `&[T]`, and `&mut [T]`, essentially mirroring the existing forwards in `library/alloc/src/vec/partial_eq.rs`

partially addresses rust-lang#152830. The `VecDeque` half of that issue is being handled separately by rust-lang#152972, so there is no overlap with this PR

also fyi: verified locally with `./x test library/alloctests --stage 1` and the new `test_partial_eq_cow_symmetric` test passes alongside the existing alloc test suite
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 22, 2026
@rustbot rustbot added A-compiletest Area: The compiletest test runner 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. labels Aug 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple-1,aarch64-apple-2,x86_64-mingw-1,i686-msvc-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 65185fc has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 22, 2026
@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 65185fc with merge 2e2f8d7

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

Workflow: https://github.com/rust-lang/rust/actions/runs/32585489103

rust-bors Bot pushed a commit that referenced this pull request Aug 22, 2026
Rollup of 4 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
extracting /checkout/obj/build/cache/2026-08-18/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt
[TIMING:end] format::InternalRustfmt {  } -- 13.865
fmt: checked 7183 files
Diff in /checkout/library/std/src/sys/fs/unix/dir.rs:28:
 use crate::sys::{AsInner, FromInner, IntoInner, cvt, cvt_r};
 use crate::{fmt, fs, io};
 
-const TRAVERSE_DIRECTORY: i32 = cfg_select! {
-    any(target_os = "freebsd", target_os = "aix") => libc::O_EXEC,
-    any(target_os = "linux", target_os = "android", target_os = "l4re") => libc::O_PATH,
-    target_os = "illumos" => libc::O_SEARCH,
-    _ => libc::O_RDONLY,
-};
+const TRAVERSE_DIRECTORY: i32 =
+    cfg_select! {
+        any(target_os = "freebsd", target_os = "aix") => libc::O_EXEC,
+        any(target_os = "linux", target_os = "android", target_os = "l4re") => libc::O_PATH,
+        target_os = "illumos" => libc::O_SEARCH,
+        _ => libc::O_RDONLY,
+    };
 
 pub struct Dir(OwnedFd);
 
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1661
Build completed unsuccessfully in 0:00:47

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-apple-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
extracting /Users/runner/work/rust/rust/build/cache/2026-08-18/rustc-nightly-aarch64-apple-darwin.tar.xz to /Users/runner/work/rust/rust/build/aarch64-apple-darwin/rustfmt
[TIMING:end] format::InternalRustfmt {  } -- 5.460
fmt: skipped untracked file AWSCLIV2.pkg
Diff in /Users/runner/work/rust/rust/library/std/src/sys/fs/unix/dir.rs:28:
 use crate::sys::{AsInner, FromInner, IntoInner, cvt, cvt_r};
 use crate::{fmt, fs, io};
 
-const TRAVERSE_DIRECTORY: i32 = cfg_select! {
-    any(target_os = "freebsd", target_os = "aix") => libc::O_EXEC,
-    any(target_os = "linux", target_os = "android", target_os = "l4re") => libc::O_PATH,
-    target_os = "illumos" => libc::O_SEARCH,
-    _ => libc::O_RDONLY,
-};
+const TRAVERSE_DIRECTORY: i32 =
+    cfg_select! {
+        any(target_os = "freebsd", target_os = "aix") => libc::O_EXEC,
+        any(target_os = "linux", target_os = "android", target_os = "l4re") => libc::O_PATH,
+        target_os = "illumos" => libc::O_SEARCH,
+        _ => libc::O_RDONLY,
+    };
 
 pub struct Dir(OwnedFd);
 
fmt: checked 7183 files
Bootstrap failed while executing `--stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin --skip tests --skip library --skip tidyselftest`
Currently active steps:
test::Tidy {  } at src/bootstrap/src/core/build_steps/test.rs:1661

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 22, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 22, 2026
@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

PR #160533, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors try cancel

@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

Hint: if you want to run another try build, you do not need to manually cancel the previous one. Just run @bors try and bors will cancel the previous build automatically.

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-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants