Skip to content

Rollup of 6 pull requests - #160035

Closed
jhpratt wants to merge 17 commits into
rust-lang:mainfrom
jhpratt:rollup-YRO5zhj
Closed

Rollup of 6 pull requests#160035
jhpratt wants to merge 17 commits into
rust-lang:mainfrom
jhpratt:rollup-YRO5zhj

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 28, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Jules-Bertholet and others added 17 commits July 6, 2026 22:34
The current documentation doesn't guarantee
that these methods are safe to call for pointers
derived from references to new unsized types
that Rust may add in the future.

Co-authored-by: Crystal Durham <cad97@cad97.com>
Removes the `pub use rustc_hir_id as hir_id` re-export in `rustc_hir`. This was rarely used and bloated import suggestions a lot.
…t, r=mejrs

Allow `UnsafeCell` content access without `get` in `invalid_reference_casting` lint

rust-lang#159730 relaxed the rules so that it's no longer necessary to use `UnsafeCell::raw_get` or `UnsafeCell::get` to access the content of an unsafe cell.

As a consequence this means that code this like is no longer invalid:
```rust
use std::cell::UnsafeCell;

unsafe fn get_mut_unchecked<T>(ptr: &UnsafeCell<T>) -> &mut T {
    let t = ptr as *const UnsafeCell<T> as *mut T;
    unsafe { &mut *t }
}
```

Fixes rust-lang#159915
cc @RalfJung
…r=JohnTitor

Clarify preconditions of raw size/align methods

The current documentation doesn't guarantee that these methods are safe to call for pointers derived from references to new unsized types that Rust may add in the future.

Take 2 of rust-lang#103372, wording from @CAD97 in rust-lang#103372 (comment).

Tracking issue: rust-lang#69835
Don't optimize across storage markers in SimplifyComparisonIntegral

This PR rejects `SimplifyComparisonIntegral` candidates when either `StorageLive` or `StorageDead` for the compared local occurs between the comparison and the terminator.

Since those candidates are rejected, the pass no longer relocates `StorageDead` into switch successors. This conservatively leaves one comparison in `issue_59352` unoptimized, so its MIR snapshots are updated.

Resolves rust-lang#158231.

r? @hanna-kruppe
…8, r=zedddie,Kivooeo

Move tests batch 18

Hi, a few more tests. Part of rust-lang#133895
r? @Kivooeo
Make BorrowSet methods public again

BorrowSet's methods were made private in rust-lang#159449 except for a couple used by Aquascope. I'd like to make these methods public again for Creusot, which indeed makes more extensive use of BorrowSet. Technically only `locals_state_at_exit` exposes information that is not already available in the current API (and Creusot does make use of it to call `Place::ignore_borrow`). The other fields can be reconstructed via `iter`, but it seems unnecessary to restrict the efficient access provided by the other methods to rustc's own analyses as opposed to third-party consumers.
Refactor rustc_hir re-exports

Probably best reviewed commit by commit.

I've been trying to split up rustc_hir and attributes.. This PR prepares for part of that, by cleaning up import paths and moving around some stuff. (See also rust-lang#159602 rust-lang#159659 and rust-lang#159893 for some previous work)
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 28, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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. labels Jul 28, 2026
@jhpratt

jhpratt commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=100

@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-*

@rust-bors

rust-bors Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 4337f58 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 28, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 28, 2026
Rollup of 6 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-*
@jhpratt jhpratt closed this Jul 28, 2026
@rust-bors rust-bors Bot 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 Jul 28, 2026
@rust-bors

rust-bors Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@jhpratt
jhpratt deleted the rollup-YRO5zhj branch July 28, 2026 05:39
@rust-bors

rust-bors Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 280ac18 (280ac18e354e77bc1f3d3a82b5cbff01685ddd60)
Base parent: d3ea035 (d3ea0356830dc019038110eba0bc8f790aaef2e4)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend 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-clippy Relevant to the Clippy team. 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.

8 participants