diff options
| author | bors <bors@rust-lang.org> | 2022-10-09 11:42:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-09 11:42:05 +0000 |
| commit | 3bcd276fa07de0da499bd71c378abe685f64f88e (patch) | |
| tree | 232967a510979f157a2041cd37e3ad62929048e2 | |
| parent | 10ef1cbf232773726e3820ddcea00f9b08b999f3 (diff) | |
| parent | ccbc63be5ef43a508f16bdbfcdbc71c15114ca8e (diff) | |
| download | rust-3bcd276fa07de0da499bd71c378abe685f64f88e.tar.gz rust-3bcd276fa07de0da499bd71c378abe685f64f88e.zip | |
Auto merge of #2590 - RalfJung:rustup, r=RalfJung
Rustup
14 files changed, 19 insertions, 59 deletions
diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index 7729a184d32..028fcd55e9c 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -e42c4d7218b2596276152c5eb1e69335621f3086 +f382c2748aec2ada91eff88840c996644ff0f70d diff --git a/src/tools/miri/test-cargo-miri/test.filter.cross-target.stdout.ref b/src/tools/miri/test-cargo-miri/test.filter.cross-target.stdout.ref index 39e1857060d..bb0282d6c91 100644 --- a/src/tools/miri/test-cargo-miri/test.filter.cross-target.stdout.ref +++ b/src/tools/miri/test-cargo-miri/test.filter.cross-target.stdout.ref @@ -1,11 +1,6 @@ running 0 tests -test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out - - -running 0 tests - test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out imported main diff --git a/src/tools/miri/test-cargo-miri/test.filter.stdout.ref b/src/tools/miri/test-cargo-miri/test.filter.stdout.ref index 39e1857060d..c618956656a 100644 --- a/src/tools/miri/test-cargo-miri/test.filter.stdout.ref +++ b/src/tools/miri/test-cargo-miri/test.filter.stdout.ref @@ -1,11 +1,6 @@ running 0 tests -test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out - - -running 0 tests - test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out imported main @@ -15,3 +10,8 @@ test simple ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out + +running 0 tests + +test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out; finished in $TIME + diff --git a/src/tools/miri/tests/fail/erroneous_const.rs b/src/tools/miri/tests/fail/erroneous_const.rs index c35a9050359..d14998ccba2 100644 --- a/src/tools/miri/tests/fail/erroneous_const.rs +++ b/src/tools/miri/tests/fail/erroneous_const.rs @@ -3,7 +3,6 @@ // Inlining changes the error location //@compile-flags: -Zmir-opt-level=0 #![feature(never_type)] -#![warn(warnings, const_err)] struct PrintName<T>(T); impl<T> PrintName<T> { diff --git a/src/tools/miri/tests/fail/erroneous_const2.rs b/src/tools/miri/tests/fail/erroneous_const2.rs index 6628166cfac..9a1a970778f 100644 --- a/src/tools/miri/tests/fail/erroneous_const2.rs +++ b/src/tools/miri/tests/fail/erroneous_const2.rs @@ -1,13 +1,9 @@ const X: u32 = 5; const Y: u32 = 6; const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; -//~^ERROR: any use of this value -//~|WARN: previously accepted +//~^ERROR: evaluation of constant value failed #[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391 fn main() { - println!("{}", FOO); //~ERROR: post-monomorphization error - //~|ERROR: evaluation of constant value failed - //~|ERROR: erroneous constant used - //~|WARN: previously accepted + println!("{}", FOO); } diff --git a/src/tools/miri/tests/fail/erroneous_const2.stderr b/src/tools/miri/tests/fail/erroneous_const2.stderr index 4d402257b8b..d41fcfd2302 100644 --- a/src/tools/miri/tests/fail/erroneous_const2.stderr +++ b/src/tools/miri/tests/fail/erroneous_const2.stderr @@ -1,39 +1,9 @@ -error: any use of this value will cause an error - --> $DIR/erroneous_const2.rs:LL:CC - | -LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; - | -------------- ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> - = note: `#[deny(const_err)]` on by default - error[E0080]: evaluation of constant value failed --> $DIR/erroneous_const2.rs:LL:CC | -LL | println!("{}", FOO); - | ^^^ referenced constant has errors - -error: erroneous constant used - --> $DIR/erroneous_const2.rs:LL:CC - | -LL | println!("{}", FOO); - | ^^^ referenced constant has errors - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> - = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: post-monomorphization error: referenced constant has errors - --> $DIR/erroneous_const2.rs:LL:CC - | -LL | println!("{}", FOO); - | ^^^ referenced constant has errors - | - = note: inside `main` at $DIR/erroneous_const2.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace +LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; + | ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow -error: aborting due to 4 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0080`. diff --git a/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs b/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs index b943c7db7cc..ca8590cc6b3 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs @@ -7,7 +7,7 @@ struct MuchAlign; fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let buf = [0u32; 256]; // `buf` is sufficiently aligned for `layout.align` on a `dyn Debug`, but not // for the actual alignment required by `MuchAlign`. diff --git a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs index 752210dca46..a807200771d 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs @@ -11,7 +11,7 @@ struct Foo { fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let foo = Foo { x: 42, y: 99 }; let p = &foo.x; let i = *p; //~ERROR: alignment 4 is required diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr1.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr1.rs index 73adc4dc449..47d1f782cb6 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr1.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr1.rs @@ -3,7 +3,7 @@ fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let x = [2u16, 3, 4]; // Make it big enough so we don't get an out-of-bounds error. let x = &x[0] as *const _ as *const u32; // This must fail because alignment is violated: the allocation's base is not sufficiently aligned. diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs index 7605dd175a9..3aa8cb492a1 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs @@ -3,7 +3,7 @@ fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let x = [2u16, 3, 4, 5]; // Make it big enough so we don't get an out-of-bounds error. let x = &x[0] as *const _ as *const *const u8; // cast to ptr-to-ptr, so that we load a ptr // This must fail because alignment is violated. Test specifically for loading pointers, diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs index 852febe4c04..606316120d6 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs @@ -6,7 +6,7 @@ fn main() { // (This would be missed if u8 allocations are *always* at odd addresses.) // // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let x = [0u8; 4]; let ptr = x.as_ptr().wrapping_offset(1).cast::<u16>(); let _val = unsafe { *ptr }; //~ERROR: but alignment diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_addr_of.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_addr_of.rs index e439cf2b03b..f1032ab52bc 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_addr_of.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_addr_of.rs @@ -4,7 +4,7 @@ use std::ptr; fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let x = [2u16, 3, 4]; // Make it big enough so we don't get an out-of-bounds error. let x = &x[0] as *const _ as *const u32; // This must fail because alignment is violated: the allocation's base is not sufficiently aligned. diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs index 9076581b55b..eff42375956 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs @@ -4,7 +4,7 @@ fn main() { // Try many times as this might work by chance. - for i in 0..10 { + for i in 0..20 { let x = i as u8; let x = &x as *const _ as *const [u32; 0]; // This must fail because alignment is violated. Test specifically for loading ZST. diff --git a/src/tools/miri/tests/pass/align.rs b/src/tools/miri/tests/pass/align.rs index 997abd73392..2b6e83891d6 100644 --- a/src/tools/miri/tests/pass/align.rs +++ b/src/tools/miri/tests/pass/align.rs @@ -22,7 +22,7 @@ fn align_to() { fn main() { // Do this a couple times in a loop because it may work "by chance". - for _ in 0..10 { + for _ in 0..20 { manual_alignment(); align_to(); } |
