Skip to content

Rollup of 20 pull requests#158837

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

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.
@rustbot rustbot added 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

This comment has been minimized.

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)

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-msvc-ext2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

     Running tests\c_str_alloc_error.rs (build\x86_64-pc-windows-msvc\stage2-std\x86_64-pc-windows-msvc\debug\build\alloctests/f351f1e9a7e114c5\out\c_str_alloc_error-f351f1e9a7e114c5.exe)

running 0 tests
error: Undefined Behavior: attempting a read access using <171667> at alloc58192[0x68], but that tag does not exist in the borrow stack for this location
##[error]    --> D:\a\rust\rust\library\std\src\sys\alloc\windows.rs:189:26
     |
 189 |                 unsafe { ptr::read((ptr as *mut Header).sub(1)).0 }
     |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this error occurs as part of an access at alloc58192[0x68..0x70]
     |
     = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
     = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
help: <171667> was created by a Unique retag at offsets [0x70..0x270]
    --> D:\a\rust\rust\library\core\src\mem\mod.rs:1038:22
     |
1038 | pub const fn drop<T>(_x: T)
     |                      ^^
     = note: stack backtrace:
             0: std::sys::alloc::windows::<impl std::alloc::GlobalAlloc for std::alloc::System>::dealloc
                 at D:\a\rust\rust\library\std\src\sys\alloc\windows.rs:189:26: 189:64
             1: <OneShotFailingAlloc as std::alloc::GlobalAlloc>::dealloc
                 at library\alloctests\tests\c_str_alloc_error.rs:33:18: 33:45
             2: _::__rust_dealloc
                 at library\alloctests\tests\c_str_alloc_error.rs:45:15: 45:34
             3: <std::boxed::Box<std::sync::mpmc::counter::Counter<std::sync::mpmc::list::Channel<test::event::CompletedTest>>> as std::ops::Drop>::drop
                 at D:\a\rust\rust\library\alloc\src\boxed.rs:2002:17: 2002:66
             4: std::ptr::drop_glue::<std::boxed::Box<std::sync::mpmc::counter::Counter<std::sync::mpmc::list::Channel<test::event::CompletedTest>>>> - shim(Some(std::boxed::Box<std::sync::mpmc::counter::Counter<std::sync::mpmc::list::Channel<test::event::CompletedTest>>>))
                 at D:\a\rust\rust\library\core\src\ptr\mod.rs:823:1: 825:25
             5: std::mem::drop::<std::boxed::Box<std::sync::mpmc::counter::Counter<std::sync::mpmc::list::Channel<test::event::CompletedTest>>>>
                 at D:\a\rust\rust\library\core\src\mem\mod.rs:1042:1: 1042:2
             6: std::sync::mpmc::counter::Sender::<std::sync::mpmc::list::Channel<test::event::CompletedTest>>::release::<{closure@<std::sync::mpmc::Sender<test::event::CompletedTest> as std::ops::Drop>::drop::{closure#1}}>
                 at D:\a\rust\rust\library\std\src\sync\mpmc\counter.rs:65:17: 65:61
             7: <std::sync::mpmc::Sender<test::event::CompletedTest> as std::ops::Drop>::drop
                 at D:\a\rust\rust\library\std\src\sync\mpmc\mod.rs:662:45: 662:85
             8: std::ptr::drop_glue::<std::sync::mpmc::Sender<test::event::CompletedTest>> - shim(Some(std::sync::mpmc::Sender<test::event::CompletedTest>))
                 at D:\a\rust\rust\library\core\src\ptr\mod.rs:823:1: 825:25
             9: std::ptr::drop_glue::<std::sync::mpsc::Sender<test::event::CompletedTest>> - shim(Some(std::sync::mpsc::Sender<test::event::CompletedTest>))
                 at D:\a\rust\rust\library\core\src\ptr\mod.rs:823:1: 825:25
             10: test::run_tests::<{closure@test::run_tests_console::{closure#2}}>
                 at D:\a\rust\rust\library\test\src\lib.rs:536:1: 536:2
             11: test::run_tests_console
                 at D:\a\rust\rust\library\test\src\console.rs:328:5: 328:70
             12: test::test_main_inner::<{closure@test::test_main_static::{closure#0}}>
                 at D:\a\rust\rust\library\test\src\lib.rs:170:19: 170:59
             13: test::test_main_static
                 at D:\a\rust\rust\library\test\src\lib.rs:195:5: 195:47
             14: main
                 at no-location
---

error: test failed, to rerun pass `-p alloctests --test c_str_alloc_error`

Caused by:
  process didn't exit successfully: `D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2\bin\cargo-miri.exe runner 'D:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2-std\x86_64-pc-windows-msvc\debug\build\alloctests/f351f1e9a7e114c5\out\c_str_alloc_error-f351f1e9a7e114c5.exe' notest -Z unstable-options --format json` (exit code: 1)
note: test exited abnormally; to see the full output pass --no-capture to the harness.
Bootstrap failed while executing `miri --stage 2 library/alloc --test-args notest`
Build completed unsuccessfully in 0:00:48
  local time: Mon Jul  6 08:29:01 CUT 2026
  network time: Mon, 06 Jul 2026 08:29:01 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

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

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 67e9636 failed: CI. Failed job:

@jhpratt jhpratt closed this Jul 6, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 6, 2026
@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 Jul 6, 2026
@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

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-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.