diff options
| author | bors <bors@rust-lang.org> | 2015-09-19 01:59:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-09-19 01:59:56 +0000 |
| commit | 2915f891673f9c8c8be3cc06aeb3bebf7df66115 (patch) | |
| tree | 76aad3dfdfa62adb82c03e240f505e87dc5dec9e /src/test | |
| parent | 6e5a3254747cf1f76f8ea698d37f688e13344392 (diff) | |
| parent | 5104a93a0d9c09bf53921c4d8a2f48a3b7891ffb (diff) | |
| download | rust-2915f891673f9c8c8be3cc06aeb3bebf7df66115.tar.gz rust-2915f891673f9c8c8be3cc06aeb3bebf7df66115.zip | |
Auto merge of #28468 - nagisa:revert-negate-unsigned-warning, r=alexcrichton
This reverts commit 0ca8e4994ee43ba9dfbded6e129b30ff5fe7a994. Fixes #27141
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/bench/shootout-mandelbrot.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/feature-gate-negate-unsigned.rs (renamed from src/test/run-pass/feature-gate-negate-unsigned.rs) | 10 | ||||
| -rw-r--r-- | src/test/run-pass/unary-minus-suffix-inference.rs | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs index 232d6b414f5..21ac23253c8 100644 --- a/src/test/bench/shootout-mandelbrot.rs +++ b/src/test/bench/shootout-mandelbrot.rs @@ -192,7 +192,7 @@ fn write_line(init_i: f64, vec_init_r: &[f64], res: &mut Vec<u8>) { i += 2; } - res.push(cur_byte^-1); + res.push(cur_byte^!0); } } diff --git a/src/test/run-pass/feature-gate-negate-unsigned.rs b/src/test/compile-fail/feature-gate-negate-unsigned.rs index 95c8e62be53..b1c73fab4ff 100644 --- a/src/test/run-pass/feature-gate-negate-unsigned.rs +++ b/src/test/compile-fail/feature-gate-negate-unsigned.rs @@ -18,21 +18,21 @@ impl std::ops::Neg for S { } const _MAX: usize = -1; -//~^ WARN unary negation of unsigned integers will be feature gated in the future +//~^ ERROR unary negation of unsigned integers may be removed in the future fn main() { let a = -1; - //~^ WARN unary negation of unsigned integers will be feature gated in the future + //~^ ERROR unary negation of unsigned integers may be removed in the future let _b : u8 = a; // for infering variable a to u8. -a; - //~^ WARN unary negation of unsigned integers will be feature gated in the future + //~^ ERROR unary negation of unsigned integers may be removed in the future let _d = -1u8; - //~^ WARN unary negation of unsigned integers will be feature gated in the future + //~^ ERROR unary negation of unsigned integers may be removed in the future for _ in -10..10u8 {} - //~^ WARN unary negation of unsigned integers will be feature gated in the future + //~^ ERROR unary negation of unsigned integers may be removed in the future -S; // should not trigger the gate; issue 26840 } diff --git a/src/test/run-pass/unary-minus-suffix-inference.rs b/src/test/run-pass/unary-minus-suffix-inference.rs index 9d685e0263f..fdb70fe248e 100644 --- a/src/test/run-pass/unary-minus-suffix-inference.rs +++ b/src/test/run-pass/unary-minus-suffix-inference.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(negate_unsigned)] + pub fn main() { let a = 1; let a_neg: i8 = -a; |
