Skip to content

Rollup of 20 pull requests#158837

Open
jhpratt wants to merge 82 commits into
rust-lang:mainfrom
jhpratt:rollup-KBtLguc
Open

Rollup of 20 pull requests#158837
jhpratt wants to merge 82 commits into
rust-lang:mainfrom
jhpratt:rollup-KBtLguc

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 6, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

tgross35 and others added 30 commits June 10, 2026 20:35
The disclaimers relevant for other `LocalKey` methods are relevant for
`update`, so add them to the documentation.
Newly stable API:

    impl<T: 'static> LocalKey<Cell<T>> {
        pub fn update(&'static self, f: impl FnOnce(T) -> T)
        where
            T: Copy;
    }

This matches the signature on `Cell`.

Tracking issue: RUST-143989
Update syntax of try build delegation in bors
do not use title case for section names
do not use title case for section names (part 2)
This updates the rust-version file to 7fb284d.
update autodiff install docs for nix
`Interned` does pointer equality/hashing, which is valid in two cases.
- The values are guaranteed to be unique (e.g. via interning, or
  construction). This is how `rustc_middle` uses `Interned`.
- The type has "identity" and different values should be considered
  distinct even if they are identical. This is how `rustc_resolve` uses
  `Interned`.

PR 137202 tried to clarify things by adding a `T: Hash` constraint to
`Interned<'a, T>`. This constraint isn't actually used, because
`Interned` is hashed based on pointer value, not contents. But it was
intended to communicate the idea that a type stored in `Interned` is
actually interned, which is likely to be done with hashing. Panicking
impls of `Hash` were added for the relevant `rustc_resolve` types to
work around the fact that it doesn't use hashing-based interning.

In my opinion PR 137202 didn't improve things. The `T: Hash` constraint
is only aimed at the interning case, and even for that case it's not
quite right because you could use a `BTreeMap` to intern instead of a
`HashMap`.

This commit does several things.
- Removes the `T: Hash` constraint and the `Hash` impls for
  `rustc_resolve` types added in PR 137202.
- Improves the comments on `Interned` to cover the non-interning cases.
- Removes the `PartialOrd`/`Ord` impls on `Interned` because (a) they're
  not used, and (b) their meaning is unclear for the "identity" case.
- Improves the documentation in `rustc_resolve` to explain how
  `Interned` usage is valid there.
update `FIXME(static_mut_refs)` comment to say: use raw pointers instead
of references.
This is more robust then assuming it's in Program Files. We still fallback to Program Files as a last resort.
Because we use `ThinVec` rather than `Vec` almost everywhere else in the
AST.
Because we use `ThinVec` rather than `Vec` almost everywhere else in the
AST.
jhpratt added 4 commits July 6, 2026 00:21
…-diagnostic, r=nnethercote

fix: emit diagnostic for AVR target without target-cpu

Fixes rust-lang#139223
…ttr-macro-values, r=folkertdev

Add regression test for builtin attr macro values

Adds a UI regression test for rust-lang#145922

The test covers builtin attributes whose value is a macro call on a macro item, including the extra attributes mentioned in the issue thread. `windows_subsystem` still emits its normal malformed-attribute error; the other cases make sure they don't regress into the delayed ICE again

Fixes rust-lang#145922

Tested:
- `python3 x.py test tests/ui/attributes/builtin-attr-macro-value-issue-145922.rs --force-rerun -j 2`
- `python3 x.py test tidy -j 2`
…-alloc-error, r=RalfJung

Add regression test for CString::clone_into unwind safety

Regression test for the panic-safety fix in rust-lang#155707

rust-lang#70201 gave `<CStr as ToOwned>::clone_into` a path that moved the target `CString`'s buffer out (leaving it empty) before growing a `Vec`; if that growth's allocation failed and unwound, the target was left without its nul terminator, which is UB. rust-lang#155707 fixed this but didn't add a test.

The failing allocator here is only honored under Miri - in a normal build a `#[global_allocator]` in a library test doesn't intercept the reallocation inside `CString::clone_into` (it lives in libstd, linked `-C prefer-dynamic`). So the test passes as a regular test and does the real check under Miri, with the unwind assertion gated on `cfg!(miri)`; it runs under Miri in CI via the library-tests-under-Miri job.

This started as rust-lang/miri#5157, but per @RalfJung a std regression test belongs with the standard library.

r? @RalfJung
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 6, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc 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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. labels Jul 6, 2026
@jhpratt

jhpratt commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=3

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

@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f423b10 has been approved by jhpratt

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 Jul 6, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 20 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
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@jhpratt

jhpratt commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@bors treeclosed-

The kernel is now handled using a rust-lang CI mirror and the queue has been progressing well. There's no reason to keep the tree closed any more.

@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Tree is now open for merging.

@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit f423b10 with merge 67e9636...

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

rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 20 pull requests

Successful merges:

 - #158377 (add `-Zforce-intrinsic-fallback` flag)
 - #158642 (Clarify some interning details)
 - #158743 (Look for cdb location in the registry first)
 - #158775 (bootstrap: only encode RUSTFLAGS when a flag contains a space)
 - #158782 (Add and use cfg(target_has_threads) to enforce no_thread impl usage)
 - #158785 (hook intrinsic-test into aarch64-gnu)
 - #157734 (Stabilize `local_key_cell_update`)
 - #158183 (std: allocate less memory in `current_exe` for OpenBSD)
 - #158671 (Move tests batch 17)
 - #158730 (Update `FIXME(static_mut_refs)` comments)
 - #158752 (Reorganize `tests/ui/issues` [18/N])
 - #158755 (Use `ThinVec` more in the AST)
 - #158757 (Fix incorrect tracking issue for `read_le`/`read_be`)
 - #158765 (Fix ICE on non-ident path in `doc(auto_cfg values)`)
 - #158771 (library: expand HashSet::extract_if coverage)
 - #158772 (rustc-dev-guide subtree update)
 - #158776 (fix: emit diagnostic for AVR target without target-cpu)
 - #158786 (Add regression test for builtin attr macro values)
 - #158807 (Add regression test for CString::clone_into unwind safety)
 - #158825 (Fix typo)
@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 685d733 (685d733dc689495688c4e9cde2accfdc6fe91102)
Base parent: 3659db0 (3659db0d3e2cd634c766fcda79ed118eca31a9fd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool 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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.