Skip to content

Commit b053879

Browse files
committed
Auto merge of #111848 - Dylan-DPC:rollup-7jqydzg, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #111501 (MIR drive-by cleanups) - #111609 (Mark internal functions and traits unsafe to reflect preconditions) - #111612 (Give better error when collecting into `&[T]`) - #111756 (Rename `{drop,forget}_{copy,ref}` lints to more consistent naming) - #111843 (move lcnr to only review types stuff) - #111844 (Migrate GUI colors test to original CSS color format) r? `@ghost` `@rustbot` modify labels: rollup
2 parents afae8df + 2e567bc commit b053879

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

tests/fail/never_say_never.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66

77
fn main() {
88
let y = &5;
9-
let x: ! = unsafe {
10-
*(y as *const _ as *const !) //~ ERROR: entering unreachable code
11-
};
12-
f(x)
9+
let x: ! = unsafe { *(y as *const _ as *const !) };
10+
f(x) //~ ERROR: entering unreachable code
1311
}
1412

1513
fn f(x: !) -> ! {

tests/fail/never_say_never.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: Undefined Behavior: entering unreachable code
22
--> $DIR/never_say_never.rs:LL:CC
33
|
4-
LL | *(y as *const _ as *const !)
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entering unreachable code
4+
LL | f(x)
5+
| ^^^^ entering unreachable code
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/stacked_borrows/illegal_write2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(drop_ref)]
1+
#![allow(dropping_references)]
22

33
fn main() {
44
let target = &mut 42;

tests/fail/uninit_buffer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@error-in-other-file: memory is uninitialized at [0x4..0x10]
22

3-
#![allow(drop_copy)]
3+
#![allow(dropping_copy_types)]
44

55
use std::alloc::{alloc, dealloc, Layout};
66
use std::slice::from_raw_parts;

tests/fail/uninit_buffer_with_provenance.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@error-in-other-file: memory is uninitialized at [0x4..0x8]
22
//@normalize-stderr-test: "a[0-9]+" -> "ALLOC"
33
#![feature(strict_provenance)]
4-
#![allow(drop_copy)]
4+
#![allow(dropping_copy_types)]
55

66
// Test printing allocations that contain single-byte provenance.
77

tests/pass/stacked-borrows/zst-field-retagging-terminates.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@compile-flags: -Zmiri-retag-fields
22
// Checks that the test does not run forever (which relies on a fast path).
33

4-
#![allow(drop_copy)]
4+
#![allow(dropping_copy_types)]
55

66
fn main() {
77
let array = [(); usize::MAX];

0 commit comments

Comments
 (0)