Skip to content

Rustup #1186

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

Closed
wants to merge 4 commits into from
Closed

Rustup #1186

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 @@
de362d88ea17ab23ca2483cb798bc7aeb81a48f5
2851e59a52673e0242532035047009c6e121c95a
8 changes: 8 additions & 0 deletions tests/run-pass/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion tests/run-pass/panic/catch_panic.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/panic/div-by-zero-2.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 1 addition & 2 deletions tests/run-pass/panic/overflowing-lsh-neg.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/panic/overflowing-lsh-neg.stderr
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/run-pass/panic/overflowing-rsh-1.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/panic/overflowing-rsh-2.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down