Skip to content

Commit 4b3e240

Browse files
committed
Auto merge of #145805 - jhpratt:rollup-h1bm4z7, r=jhpratt
Rollup of 5 pull requests Successful merges: - rust-lang/rust#144531 (Add lint against integer to pointer transmutes) - rust-lang/rust#145307 (Fix `LazyLock` poison panic message) - rust-lang/rust#145554 (rustc-dev-guide subtree update) - rust-lang/rust#145798 (Use unnamed lifetime spans as primary spans for `MISMATCHED_LIFETIME_SYNTAXES`) - rust-lang/rust#145799 (std/src/lib.rs: mention "search button" instead of "search bar") r? `@ghost` `@rustbot` modify labels: rollup
2 parents fc132ae + fa34c29 commit 4b3e240

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

tests/fail/branchless-select-i128-pointer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(integer_to_ptr_transmutes)]
2+
13
use std::mem::transmute;
24

35
#[cfg(target_pointer_width = "32")]

tests/fail/provenance/provenance_transmute.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@compile-flags: -Zmiri-permissive-provenance
22

3+
#![allow(integer_to_ptr_transmutes)]
4+
35
use std::mem;
46

57
// This is the example from

tests/fail/validity/dangling_ref1.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// Make sure we catch this even without Stacked Borrows
22
//@compile-flags: -Zmiri-disable-stacked-borrows
3+
4+
#![allow(integer_to_ptr_transmutes)]
5+
36
use std::mem;
47

58
fn main() {

tests/panic/transmute_fat2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(integer_to_ptr_transmutes)]
2+
13
fn main() {
24
#[cfg(all(target_endian = "little", target_pointer_width = "64"))]
35
let bad = unsafe { std::mem::transmute::<u128, &[u8]>(42) };

tests/pass/binops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ fn test_bool() {
3232
assert_eq!(true ^ true, false);
3333
}
3434

35+
#[allow(integer_to_ptr_transmutes)]
3536
fn test_ptr() {
3637
unsafe {
3738
let p1: *const u8 = ::std::mem::transmute(0_usize);

tests/pass/too-large-primval-write-problem.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
//
88
// This is just intended as a regression test to make sure we don't reintroduce this problem.
99

10+
#![allow(integer_to_ptr_transmutes)]
11+
1012
#[cfg(target_pointer_width = "32")]
1113
fn main() {
1214
use std::mem::transmute;

0 commit comments

Comments
 (0)