Rollup of 6 pull requests - #160035
Closed
jhpratt wants to merge 17 commits into
Closed
Conversation
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)
Member
Author
Contributor
This comment has been minimized.
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-*
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
UnsafeCellcontent access withoutgetininvalid_reference_castinglint #159960 (AllowUnsafeCellcontent access withoutgetininvalid_reference_castinglint)r? @ghost
Create a similar rollup