rustup; fix tests

This commit is contained in:
Ralf Jung 2020-09-24 09:19:03 +02:00
parent 462243ef5a
commit 67c5067a2f
6 changed files with 7 additions and 7 deletions

View file

@ -1 +1 @@
a6008fac97f81a3fc51668b0c7fa0e2e6f2a599b
78a089487b5f6d5e4205ac4500410b442857bced

View file

@ -1,6 +1,6 @@
use std::alloc::{alloc, dealloc, Layout};
// error-pattern: allocation has size 1 and alignment 1, but gave size 1 and alignment 2
// error-pattern: has size 1 and alignment 1, but gave size 1 and alignment 2
fn main() {
unsafe {

View file

@ -1,6 +1,6 @@
use std::alloc::{alloc, dealloc, Layout};
// error-pattern: allocation has size 1 and alignment 1, but gave size 2 and alignment 1
// error-pattern: has size 1 and alignment 1, but gave size 2 and alignment 1
fn main() {
unsafe {

View file

@ -1,6 +1,6 @@
use std::alloc::{alloc, realloc, Layout};
// error-pattern: allocation has size 1 and alignment 1, but gave size 2 and alignment 1
// error-pattern: has size 1 and alignment 1, but gave size 2 and alignment 1
fn main() {
unsafe {

View file

@ -1,7 +1,7 @@
// Validation/SB changes why we fail
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
// error-pattern: deallocating stack variable memory using Rust heap deallocation operation
// error-pattern: which is stack variable memory, using Rust heap deallocation operation
fn main() {
let x = 42;

View file

@ -4,7 +4,7 @@ use std::ptr::NonNull;
use std::alloc::{Global, AllocRef, Layout, System};
use std::slice;
fn check_alloc<T: AllocRef>(mut allocator: T) { unsafe {
fn check_alloc<T: AllocRef>(allocator: T) { unsafe {
for &align in &[4, 8, 16, 32] {
let layout_20 = Layout::from_size_align(20, align).unwrap();
let layout_40 = Layout::from_size_align(40, 4*align).unwrap();
@ -42,7 +42,7 @@ fn check_alloc<T: AllocRef>(mut allocator: T) { unsafe {
}
} }
fn check_align_requests<T: AllocRef>(mut allocator: T) {
fn check_align_requests<T: AllocRef>(allocator: T) {
for &size in &[2, 8, 64] { // size less than and bigger than alignment
for &align in &[4, 8, 16, 32] { // Be sure to cover less than and bigger than `MIN_ALIGN` for all architectures
let iterations = 32;