diff --git a/rust-version b/rust-version index 00feed4764..fe788019e0 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -de362d88ea17ab23ca2483cb798bc7aeb81a48f5 +2851e59a52673e0242532035047009c6e121c95a diff --git a/tests/run-pass/fs.rs b/tests/run-pass/fs.rs index 453432f64f..a6ce8627cd 100644 --- a/tests/run-pass/fs.rs +++ b/tests/run-pass/fs.rs @@ -169,8 +169,16 @@ fn test_rename() { let file = File::create(&path1).unwrap(); drop(file); + + // Renaming should succeed rename(&path1, &path2).unwrap(); + // Check that the old file path isn't present assert_eq!(ErrorKind::NotFound, path1.metadata().unwrap_err().kind()); + // Check that the file has moved successfully assert!(path2.metadata().unwrap().is_file()); + + // Renaming a nonexistent file should fail + assert_eq!(ErrorKind::NotFound, rename(&path1, &path2).unwrap_err().kind()); + remove_file(&path2).unwrap(); } diff --git a/tests/run-pass/panic/catch_panic.rs b/tests/run-pass/panic/catch_panic.rs index 4d4206923a..21a6fee7c9 100644 --- a/tests/run-pass/panic/catch_panic.rs +++ b/tests/run-pass/panic/catch_panic.rs @@ -1,7 +1,7 @@ // ignore-windows: Unwind panicking does not currently work on Windows // normalize-stderr-test "[^ ]*libcore/macros/mod.rs[0-9:]*" -> "$$LOC" #![feature(never_type)] -#![allow(const_err)] +#![allow(unconditional_panic)] use std::panic::{catch_unwind, AssertUnwindSafe}; use std::cell::Cell; diff --git a/tests/run-pass/panic/div-by-zero-2.rs b/tests/run-pass/panic/div-by-zero-2.rs index 6cc319bf0b..0718e2ec1d 100644 --- a/tests/run-pass/panic/div-by-zero-2.rs +++ b/tests/run-pass/panic/div-by-zero-2.rs @@ -1,5 +1,5 @@ // ignore-windows: Unwind panicking does not currently work on Windows -#![allow(const_err)] +#![allow(unconditional_panic, const_err)] fn main() { let _n = 1 / 0; diff --git a/tests/run-pass/panic/overflowing-lsh-neg.rs b/tests/run-pass/panic/overflowing-lsh-neg.rs index b214243c88..3cd3dcd6b3 100644 --- a/tests/run-pass/panic/overflowing-lsh-neg.rs +++ b/tests/run-pass/panic/overflowing-lsh-neg.rs @@ -1,6 +1,5 @@ // ignore-windows: Unwind panicking does not currently work on Windows -#![allow(exceeding_bitshifts)] -#![allow(const_err)] +#![allow(arithmetic_overflow, const_err)] fn main() { let _n = 2i64 << -1; diff --git a/tests/run-pass/panic/overflowing-lsh-neg.stderr b/tests/run-pass/panic/overflowing-lsh-neg.stderr index fe5a35e6b3..e1e7daa119 100644 --- a/tests/run-pass/panic/overflowing-lsh-neg.stderr +++ b/tests/run-pass/panic/overflowing-lsh-neg.stderr @@ -1 +1 @@ -thread 'main' panicked at 'attempt to shift left with overflow', $DIR/overflowing-lsh-neg.rs:6:14 +thread 'main' panicked at 'attempt to shift left with overflow', $DIR/overflowing-lsh-neg.rs:5:14 diff --git a/tests/run-pass/panic/overflowing-rsh-1.rs b/tests/run-pass/panic/overflowing-rsh-1.rs index 68ea51d167..d728c027dd 100644 --- a/tests/run-pass/panic/overflowing-rsh-1.rs +++ b/tests/run-pass/panic/overflowing-rsh-1.rs @@ -1,5 +1,5 @@ // ignore-windows: Unwind panicking does not currently work on Windows -#![allow(exceeding_bitshifts, const_err)] +#![allow(arithmetic_overflow, const_err)] fn main() { let _n = 1i64 >> 64; diff --git a/tests/run-pass/panic/overflowing-rsh-2.rs b/tests/run-pass/panic/overflowing-rsh-2.rs index 4e287f20ad..57709d5644 100644 --- a/tests/run-pass/panic/overflowing-rsh-2.rs +++ b/tests/run-pass/panic/overflowing-rsh-2.rs @@ -1,5 +1,5 @@ // ignore-windows: Unwind panicking does not currently work on Windows -#![allow(exceeding_bitshifts, const_err)] +#![allow(arithmetic_overflow, const_err)] fn main() { // Make sure we catch overflows that would be hidden by first casting the RHS to u32