Skip to content

Commit fed5003

Browse files
committed
Adjust tests for new drop and forget lints
1 parent 43ac546 commit fed5003

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

tests/fail/stacked_borrows/illegal_write2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(drop_ref)]
2+
13
fn main() {
24
let target = &mut 42;
35
let target2 = target as *mut _;

tests/fail/uninit_buffer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@error-pattern: memory is uninitialized at [0x4..0x10]
22

3+
#![allow(drop_copy)]
4+
35
use std::alloc::{alloc, dealloc, Layout};
46
use std::slice::from_raw_parts;
57

tests/fail/uninit_buffer_with_provenance.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//@normalize-stderr-test: "a[0-9]+" -> "ALLOC"
33
#![feature(strict_provenance)]
44

5+
#![allow(drop_copy)]
6+
57
// Test printing allocations that contain single-byte provenance.
68

79
use std::alloc::{alloc, dealloc, Layout};

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//@compile-flags: -Zmiri-retag-fields
22
// Checks that the test does not run forever (which relies on a fast path).
3+
4+
#![allow(drop_copy)]
5+
36
fn main() {
47
let array = [(); usize::MAX];
58
drop(array); // Pass the array to a function, retagging its fields

0 commit comments

Comments
 (0)