Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup; fix tests #1561

Merged
merged 1 commit into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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