Skip to content

Commit

Permalink
Auto merge of #1187 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
fix for const-prop lint changes

Cc rust-lang/rust#69331
  • Loading branch information
bors committed Feb 21, 2020
2 parents fe8068d + 3e2f29a commit 5b84620
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
de362d88ea17ab23ca2483cb798bc7aeb81a48f5
2851e59a52673e0242532035047009c6e121c95a
2 changes: 1 addition & 1 deletion test-cargo-miri/tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn do_panic() { // In large, friendly letters :)

// FIXME: see above
#[test]
#[allow(const_err)]
#[allow(unconditional_panic)]
#[cfg_attr(not(windows), should_panic(expected="the len is 0 but the index is 42"))]
fn fail_index_check() {
#[cfg(not(windows))]
Expand Down
3 changes: 0 additions & 3 deletions tests/run-pass/coerce_non_capture_closure_to_fn_ptr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// allow(const_err) to work around a bug in warnings
#[allow(const_err)]
static FOO: fn() = || { assert_ne!(42, 43) };
#[allow(const_err)]
static BAR: fn(i32, i32) = |a, b| { assert_ne!(a, b) };

// use to first make the closure FnOnce() before making it fn()
Expand Down
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)]

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)]

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)]

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)]

fn main() {
// Make sure we catch overflows that would be hidden by first casting the RHS to u32
Expand Down

0 comments on commit 5b84620

Please sign in to comment.