diff --git a/rust-version b/rust-version index e7e27291d5..5ce2e46513 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -698fcd38fa9548e64a2092ff48c9d15ceb57d40c +3761dcd3467441f78939ccb3b341b03b6a7558d7 diff --git a/tests/compile-fail/deallocate-bad-alignment.rs b/tests/compile-fail/deallocate-bad-alignment.rs index d124136a96..2ac35a450c 100644 --- a/tests/compile-fail/deallocate-bad-alignment.rs +++ b/tests/compile-fail/deallocate-bad-alignment.rs @@ -3,7 +3,7 @@ extern crate alloc; use alloc::alloc::Global; -use std::alloc::*; +use std::alloc::{AllocRef, Layout}; // error-pattern: incorrect alloc info: expected size 1 and align 2, got size 1 and align 1 diff --git a/tests/compile-fail/deallocate-bad-size.rs b/tests/compile-fail/deallocate-bad-size.rs index 7a95b0ac7e..c5b48f5ddf 100644 --- a/tests/compile-fail/deallocate-bad-size.rs +++ b/tests/compile-fail/deallocate-bad-size.rs @@ -3,7 +3,7 @@ extern crate alloc; use alloc::alloc::Global; -use std::alloc::*; +use std::alloc::{AllocRef, Layout}; // error-pattern: incorrect alloc info: expected size 2 and align 1, got size 1 and align 1 diff --git a/tests/compile-fail/deallocate-twice.rs b/tests/compile-fail/deallocate-twice.rs index 03fab76d60..02c442f0ab 100644 --- a/tests/compile-fail/deallocate-twice.rs +++ b/tests/compile-fail/deallocate-twice.rs @@ -3,7 +3,7 @@ extern crate alloc; use alloc::alloc::Global; -use std::alloc::*; +use std::alloc::{AllocRef, Layout}; // error-pattern: tried to deallocate dangling pointer diff --git a/tests/compile-fail/reallocate-bad-size.rs b/tests/compile-fail/reallocate-bad-size.rs index 24d9132054..905e8e0617 100644 --- a/tests/compile-fail/reallocate-bad-size.rs +++ b/tests/compile-fail/reallocate-bad-size.rs @@ -3,7 +3,7 @@ extern crate alloc; use alloc::alloc::Global; -use std::alloc::*; +use std::alloc::{AllocRef, Layout}; // error-pattern: incorrect alloc info: expected size 2 and align 1, got size 1 and align 1 diff --git a/tests/compile-fail/reallocate-change-alloc.rs b/tests/compile-fail/reallocate-change-alloc.rs index 312edfd52b..21468739b3 100644 --- a/tests/compile-fail/reallocate-change-alloc.rs +++ b/tests/compile-fail/reallocate-change-alloc.rs @@ -3,7 +3,7 @@ extern crate alloc; use alloc::alloc::Global; -use std::alloc::*; +use std::alloc::{AllocRef, Layout}; fn main() { unsafe { diff --git a/tests/compile-fail/reallocate-dangling.rs b/tests/compile-fail/reallocate-dangling.rs index 450f63cc40..ee73cfce86 100644 --- a/tests/compile-fail/reallocate-dangling.rs +++ b/tests/compile-fail/reallocate-dangling.rs @@ -3,7 +3,7 @@ extern crate alloc; use alloc::alloc::Global; -use std::alloc::*; +use std::alloc::{AllocRef, Layout}; // error-pattern: dangling pointer was dereferenced diff --git a/tests/run-pass/heap_allocator.rs b/tests/run-pass/heap_allocator.rs index 7bcb08058c..907fbf962d 100644 --- a/tests/run-pass/heap_allocator.rs +++ b/tests/run-pass/heap_allocator.rs @@ -1,10 +1,10 @@ #![feature(allocator_api)] use std::ptr::NonNull; -use std::alloc::{Global, Alloc, Layout, System}; +use std::alloc::{Global, AllocRef, Layout, System}; use std::slice; -fn check_alloc(mut allocator: T) { unsafe { +fn check_alloc(mut allocator: T) { unsafe { for &align in &[4, 8, 16, 32] { let layout = Layout::from_size_align(20, align).unwrap(); @@ -40,7 +40,7 @@ fn check_alloc(mut allocator: T) { unsafe { } } } -fn check_align_requests(mut allocator: T) { +fn check_align_requests(mut 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;