Skip to content

Commit

Permalink
Auto merge of #1561 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
rustup; fix tests
  • Loading branch information
bors committed Sep 24, 2020
2 parents 462243e + 67c5067 commit 2f84bfc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a6008fac97f81a3fc51668b0c7fa0e2e6f2a599b
78a089487b5f6d5e4205ac4500410b442857bced
2 changes: 1 addition & 1 deletion tests/compile-fail/alloc/deallocate-bad-alignment.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/alloc/deallocate-bad-size.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/alloc/reallocate-bad-size.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/alloc/stack_free.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/run-pass/heap_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2f84bfc

Please sign in to comment.