diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-16 20:02:50 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-02-16 20:02:50 +0000 |
| commit | ec2cc761bc7067712ecc7734502f703fe3b024c8 (patch) | |
| tree | 7ab55cd9562da45b86c959f1b98c199b2b03ca92 /tests/ui/numbers-arithmetic | |
| parent | e53d6dd35bb38b81dff4b00497f4c152e9009499 (diff) | |
| download | rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.tar.gz rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.zip | |
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
Diffstat (limited to 'tests/ui/numbers-arithmetic')
75 files changed, 166 insertions, 166 deletions
diff --git a/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs b/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs index 64ff1f8b1d2..50e8974fd7c 100644 --- a/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs +++ b/tests/ui/numbers-arithmetic/apfloat-modulo-wrong.rs @@ -1,5 +1,5 @@ -// run-pass -// check-run-results +//@ run-pass +//@ check-run-results // regression test for issue #109567 fn f() -> f64 { diff --git a/tests/ui/numbers-arithmetic/arith-unsigned.rs b/tests/ui/numbers-arithmetic/arith-unsigned.rs index ad57d9f8645..5a285ceca32 100644 --- a/tests/ui/numbers-arithmetic/arith-unsigned.rs +++ b/tests/ui/numbers-arithmetic/arith-unsigned.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_comparisons)] // Unsigned integer operations diff --git a/tests/ui/numbers-arithmetic/div-mod.rs b/tests/ui/numbers-arithmetic/div-mod.rs index acb92a7df73..ee654e00463 100644 --- a/tests/ui/numbers-arithmetic/div-mod.rs +++ b/tests/ui/numbers-arithmetic/div-mod.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/divide-by-zero.rs b/tests/ui/numbers-arithmetic/divide-by-zero.rs index 30e0e6c1bdd..626daf9771d 100644 --- a/tests/ui/numbers-arithmetic/divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/divide-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:attempt to divide by zero -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:attempt to divide by zero +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs b/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs index 260281d75a4..b61ca054954 100644 --- a/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs +++ b/tests/ui/numbers-arithmetic/float-int-invalid-const-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Forces evaluation of constants, triggering hard error fn force<T>(_: T) {} diff --git a/tests/ui/numbers-arithmetic/float-literal-inference.rs b/tests/ui/numbers-arithmetic/float-literal-inference.rs index c4645e4f8ff..a643be3f0c1 100644 --- a/tests/ui/numbers-arithmetic/float-literal-inference.rs +++ b/tests/ui/numbers-arithmetic/float-literal-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass struct S { z: f64 } diff --git a/tests/ui/numbers-arithmetic/float-nan.rs b/tests/ui/numbers-arithmetic/float-nan.rs index 0cc6473e5c4..7d1af0155da 100644 --- a/tests/ui/numbers-arithmetic/float-nan.rs +++ b/tests/ui/numbers-arithmetic/float-nan.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let nan: f64 = f64::NAN; diff --git a/tests/ui/numbers-arithmetic/float-signature.rs b/tests/ui/numbers-arithmetic/float-signature.rs index d47280ea2e7..a68a1d6e6f3 100644 --- a/tests/ui/numbers-arithmetic/float-signature.rs +++ b/tests/ui/numbers-arithmetic/float-signature.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { diff --git a/tests/ui/numbers-arithmetic/float.rs b/tests/ui/numbers-arithmetic/float.rs index d55c05857b6..0b33a0e9f6c 100644 --- a/tests/ui/numbers-arithmetic/float.rs +++ b/tests/ui/numbers-arithmetic/float.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let pi = 3.1415927f64; println!("{}", -pi * (pi + 2.0 / pi) - pi * 5.0); diff --git a/tests/ui/numbers-arithmetic/float2.rs b/tests/ui/numbers-arithmetic/float2.rs index b1bcf8da5a3..1b7add01cc6 100644 --- a/tests/ui/numbers-arithmetic/float2.rs +++ b/tests/ui/numbers-arithmetic/float2.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/float_math.rs b/tests/ui/numbers-arithmetic/float_math.rs index a2902ee5608..2c7d8ab255a 100644 --- a/tests/ui/numbers-arithmetic/float_math.rs +++ b/tests/ui/numbers-arithmetic/float_math.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(core_intrinsics)] use std::intrinsics::{fadd_fast, fsub_fast, fmul_fast, fdiv_fast, frem_fast}; diff --git a/tests/ui/numbers-arithmetic/floatlits.rs b/tests/ui/numbers-arithmetic/floatlits.rs index 07049af315b..21f19b69c49 100644 --- a/tests/ui/numbers-arithmetic/floatlits.rs +++ b/tests/ui/numbers-arithmetic/floatlits.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/i128.rs b/tests/ui/numbers-arithmetic/i128.rs index d61a1ab03b6..890701fdd31 100644 --- a/tests/ui/numbers-arithmetic/i128.rs +++ b/tests/ui/numbers-arithmetic/i128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(overflowing_literals)] #![feature(test)] diff --git a/tests/ui/numbers-arithmetic/i32-sub.rs b/tests/ui/numbers-arithmetic/i32-sub.rs index 56df772b4e1..c2aed62c966 100644 --- a/tests/ui/numbers-arithmetic/i32-sub.rs +++ b/tests/ui/numbers-arithmetic/i32-sub.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/i8-incr.rs b/tests/ui/numbers-arithmetic/i8-incr.rs index 718d259f735..a0f1becce2e 100644 --- a/tests/ui/numbers-arithmetic/i8-incr.rs +++ b/tests/ui/numbers-arithmetic/i8-incr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/int-abs-overflow.rs b/tests/ui/numbers-arithmetic/int-abs-overflow.rs index d63ba8cb03e..e9114138048 100644 --- a/tests/ui/numbers-arithmetic/int-abs-overflow.rs +++ b/tests/ui/numbers-arithmetic/int-abs-overflow.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C overflow-checks=on -// ignore-emscripten no threads support -// needs-unwind +//@ run-pass +//@ compile-flags: -C overflow-checks=on +//@ ignore-emscripten no threads support +//@ needs-unwind use std::thread; diff --git a/tests/ui/numbers-arithmetic/int.rs b/tests/ui/numbers-arithmetic/int.rs index b496a70a6fe..edc7f729444 100644 --- a/tests/ui/numbers-arithmetic/int.rs +++ b/tests/ui/numbers-arithmetic/int.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: isize = 10; } diff --git a/tests/ui/numbers-arithmetic/integer-literal-radix.rs b/tests/ui/numbers-arithmetic/integer-literal-radix.rs index 8f61ea17a12..ebccb023e60 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-radix.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-radix.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let a = 0xBEEF_isize; diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs index 80248dc223d..406ed470458 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-2.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 fn foo(_: *const ()) {} diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs index bec718a3c6a..8d49b21861f 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference-3.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { println!("{}", std::mem::size_of_val(&1)); } diff --git a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs index d177ced1a69..97c10bc3c56 100644 --- a/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs +++ b/tests/ui/numbers-arithmetic/integer-literal-suffix-inference.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { fn id_i8(n: i8) -> i8 { n } diff --git a/tests/ui/numbers-arithmetic/issue-105626.rs b/tests/ui/numbers-arithmetic/issue-105626.rs index 5466f8e18d4..f942cf1283d 100644 --- a/tests/ui/numbers-arithmetic/issue-105626.rs +++ b/tests/ui/numbers-arithmetic/issue-105626.rs @@ -1,6 +1,6 @@ -// run-pass -// only-x86 -// compile-flags: -Ctarget-feature=+sse2 +//@ run-pass +//@ only-x86 +//@ compile-flags: -Ctarget-feature=+sse2 use std::hint::black_box; diff --git a/tests/ui/numbers-arithmetic/issue-8460-const.rs b/tests/ui/numbers-arithmetic/issue-8460-const.rs index 02e7567dafa..223c05d72d6 100644 --- a/tests/ui/numbers-arithmetic/issue-8460-const.rs +++ b/tests/ui/numbers-arithmetic/issue-8460-const.rs @@ -1,9 +1,9 @@ -// revisions: noopt opt opt_with_overflow_checks -//[noopt]compile-flags: -C opt-level=0 -//[opt]compile-flags: -O -//[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O +//@ revisions: noopt opt opt_with_overflow_checks +//@[noopt]compile-flags: -C opt-level=0 +//@[opt]compile-flags: -O +//@[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O -// build-fail +//@ build-fail use std::thread; diff --git a/tests/ui/numbers-arithmetic/issue-8460.rs b/tests/ui/numbers-arithmetic/issue-8460.rs index 77368b87e96..9d3044a7ca0 100644 --- a/tests/ui/numbers-arithmetic/issue-8460.rs +++ b/tests/ui/numbers-arithmetic/issue-8460.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] -// ignore-emscripten no threads support -// needs-unwind +//@ ignore-emscripten no threads support +//@ needs-unwind #![feature(rustc_attrs)] use std::thread; diff --git a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs index 2c4bdad3e91..654e54a1591 100644 --- a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-add-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-add-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.rs b/tests/ui/numbers-arithmetic/location-add-overflow.rs index 085623c9bf7..65452e2c2c2 100644 --- a/tests/ui/numbers-arithmetic/location-add-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-add-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-add-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-add-overflow.rs fn main() { let _: u8 = 255 + &1; diff --git a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs index 21b5e7a8110..8bce8ded5da 100644 --- a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-divide-assign-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-divide-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs index 7d045fc5602..180f72eb6f4 100644 --- a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-divide-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-divide-by-zero.rs // https://github.com/rust-lang/rust/issues/114814 diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs index 88d602e4b6d..bc4377eb679 100644 --- a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mod-assign-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mod-assign-by-zero.rs fn main() { let mut a = 1; diff --git a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs index 4397adb75d1..2f176013db2 100644 --- a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs +++ b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mod-by-zero.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mod-by-zero.rs fn main() { let _ = 1 % &0; diff --git a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs index b042751ded9..33de927b034 100644 --- a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mul-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mul-assign-overflow.rs fn main() { let mut a: u8 = 255; diff --git a/tests/ui/numbers-arithmetic/location-mul-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-overflow.rs index 6dd58874874..8d93406ba50 100644 --- a/tests/ui/numbers-arithmetic/location-mul-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-mul-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-mul-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-mul-overflow.rs fn main() { let _: u8 = 255 * &2; diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs index 5b92ada2e0b..1bc1a9b2d66 100644 --- a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-sub-assign-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-sub-assign-overflow.rs fn main() { let mut a: u8 = 0; diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-overflow.rs index 2d77cb8f55e..911b2815a00 100644 --- a/tests/ui/numbers-arithmetic/location-sub-overflow.rs +++ b/tests/ui/numbers-arithmetic/location-sub-overflow.rs @@ -1,6 +1,6 @@ -// run-fail -// ignore-wasm32 -// error-pattern:location-sub-overflow.rs +//@ run-fail +//@ ignore-wasm32 +//@ error-pattern:location-sub-overflow.rs fn main() { let _: u8 = 0 - &1; diff --git a/tests/ui/numbers-arithmetic/mod-zero.rs b/tests/ui/numbers-arithmetic/mod-zero.rs index 08371639412..f3cc7c9fc88 100644 --- a/tests/ui/numbers-arithmetic/mod-zero.rs +++ b/tests/ui/numbers-arithmetic/mod-zero.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:attempt to calculate the remainder with a divisor of zero -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:attempt to calculate the remainder with a divisor of zero +//@ ignore-emscripten no processes #[allow(unconditional_panic)] fn main() { diff --git a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs index 0e487a700b8..ef5db4995fb 100644 --- a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs +++ b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// compile-flags: -C debug_assertions=true -// needs-unwind -// ignore-emscripten dies with an LLVM error +//@ run-pass +//@ compile-flags: -C debug_assertions=true +//@ needs-unwind +//@ ignore-emscripten dies with an LLVM error use std::panic; diff --git a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs index 982cd97c50a..f4cd8d0d63d 100644 --- a/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs +++ b/tests/ui/numbers-arithmetic/next-power-of-two-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// compile-flags: -C debug_assertions=no -// ignore-emscripten dies with an LLVM error +//@ run-pass +//@ compile-flags: -C debug_assertions=no +//@ ignore-emscripten dies with an LLVM error fn main() { for i in 129..256 { diff --git a/tests/ui/numbers-arithmetic/num-wrapping.rs b/tests/ui/numbers-arithmetic/num-wrapping.rs index 43b1059f944..0e649fd2d70 100644 --- a/tests/ui/numbers-arithmetic/num-wrapping.rs +++ b/tests/ui/numbers-arithmetic/num-wrapping.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_macros)] -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions // // Test std::num::Wrapping<T> for {uN, iN, usize, isize} diff --git a/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs b/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs index 5798c2591a0..780814941db 100644 --- a/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs +++ b/tests/ui/numbers-arithmetic/numeric-method-autoexport.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // This file is intended to test only that methods are automatically // reachable for each numeric type, for each exported impl, with no imports // necessary. Testing the methods of the impls is done within the source diff --git a/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs b/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs index 318be2a6401..fae5c689031 100644 --- a/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs +++ b/tests/ui/numbers-arithmetic/overflow-attribute-works-1.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow_checks=true +//@ run-pass +//@ compile-flags: -C overflow_checks=true #![feature(cfg_overflow_checks)] diff --git a/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs b/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs index 0367d980a64..0af3868929a 100644 --- a/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs +++ b/tests/ui/numbers-arithmetic/overflow-attribute-works-2.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C overflow_checks=false +//@ run-pass +//@ compile-flags: -C overflow_checks=false #![feature(cfg_overflow_checks)] diff --git a/tests/ui/numbers-arithmetic/overflowing-add.rs b/tests/ui/numbers-arithmetic/overflowing-add.rs index c45b44966ed..16583f6eb74 100644 --- a/tests/ui/numbers-arithmetic/overflowing-add.rs +++ b/tests/ui/numbers-arithmetic/overflowing-add.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to add with overflow -// compile-flags: -C debug-assertions -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to add with overflow +//@ compile-flags: -C debug-assertions +//@ ignore-emscripten no processes #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs index 7f8b0c87760..0d300709be2 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs index 76718ecd1fa..6d7be30d302 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs index b2bdd09bffb..65f536f627d 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-3.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs b/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs index 1042bfcb34d..f1943c0f439 100644 --- a/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs +++ b/tests/ui/numbers-arithmetic/overflowing-lsh-4.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions // This function is checking that our automatic truncation does not // sidestep the overflow checking. diff --git a/tests/ui/numbers-arithmetic/overflowing-mul.rs b/tests/ui/numbers-arithmetic/overflowing-mul.rs index ec5279d321c..59575d2e86e 100644 --- a/tests/ui/numbers-arithmetic/overflowing-mul.rs +++ b/tests/ui/numbers-arithmetic/overflowing-mul.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs index dabb0d50cbb..dc3b6c280f3 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg-nonzero.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:attempt to negate with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:attempt to negate with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-neg.rs b/tests/ui/numbers-arithmetic/overflowing-neg.rs index 53024375393..ab49662b98f 100644 --- a/tests/ui/numbers-arithmetic/overflowing-neg.rs +++ b/tests/ui/numbers-arithmetic/overflowing-neg.rs @@ -1,7 +1,7 @@ -// run-fail -// error-pattern:attempt to negate with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:attempt to negate with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs index c2c8cad5f0b..69e22c2262a 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-signed.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions fn main() { let _x = 2i32.pow(1024); diff --git a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs index 4a0f9abd982..f980033c480 100644 --- a/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs +++ b/tests/ui/numbers-arithmetic/overflowing-pow-unsigned.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to multiply with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to multiply with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions fn main() { let _x = 2u32.pow(1024); diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs index 80593c8656f..20971e4807e 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-1.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs index 917352bfce4..c9829ad2793 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-2.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs index 1e052990a76..e2de731e9ab 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-3.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs index be918becd3a..9efa1164012 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-4.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions // This function is checking that our (type-based) automatic // truncation does not sidestep the overflow checking. diff --git a/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs b/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs index f75e779ed15..8088ee58ea8 100644 --- a/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs +++ b/tests/ui/numbers-arithmetic/overflowing-rsh-5.rs @@ -1,5 +1,5 @@ -// build-fail -// compile-flags: -C debug-assertions +//@ build-fail +//@ compile-flags: -C debug-assertions #![deny(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/overflowing-sub.rs b/tests/ui/numbers-arithmetic/overflowing-sub.rs index 119d8074802..44aadf6b3e7 100644 --- a/tests/ui/numbers-arithmetic/overflowing-sub.rs +++ b/tests/ui/numbers-arithmetic/overflowing-sub.rs @@ -1,8 +1,8 @@ -// run-fail -// error-pattern:thread 'main' panicked -// error-pattern:attempt to subtract with overflow -// ignore-emscripten no processes -// compile-flags: -C debug-assertions +//@ run-fail +//@ error-pattern:thread 'main' panicked +//@ error-pattern:attempt to subtract with overflow +//@ ignore-emscripten no processes +//@ compile-flags: -C debug-assertions #![allow(arithmetic_overflow)] diff --git a/tests/ui/numbers-arithmetic/promoted_overflow.rs b/tests/ui/numbers-arithmetic/promoted_overflow.rs index ba168f773d8..96c5f3b87e1 100644 --- a/tests/ui/numbers-arithmetic/promoted_overflow.rs +++ b/tests/ui/numbers-arithmetic/promoted_overflow.rs @@ -1,12 +1,12 @@ #![allow(arithmetic_overflow)] -// run-fail -// error-pattern: overflow -// compile-flags: -C overflow-checks=yes +//@ run-fail +//@ error-pattern: overflow +//@ compile-flags: -C overflow-checks=yes // for some reason, fails to match error string on // wasm32-unknown-unknown with stripped debuginfo and symbols, // so don't strip it -// compile-flags:-Cstrip=none +//@ compile-flags:-Cstrip=none fn main() { let x: &'static u32 = &(0u32 - 1); diff --git a/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs b/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs index 76279e91308..7004c9a3665 100644 --- a/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs +++ b/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass -// compile-flags: -O +//@ compile-flags: -O fn main() { let x = &(0u32 - 1); diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs b/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs index 088b2fcdd14..4b176ef5caa 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts-impl.rs @@ -1,4 +1,4 @@ -// ignore-test (auxiliary, used by other tests) +//@ ignore-test (auxiliary, used by other tests) // Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction. // diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs b/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs index cad05917391..8f1fe59ddc5 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts-wasm.rs @@ -1,6 +1,6 @@ -// run-pass -// only-wasm32 -// compile-flags: -Zmir-opt-level=0 -C target-feature=+nontrapping-fptoint +//@ run-pass +//@ only-wasm32 +//@ compile-flags: -Zmir-opt-level=0 -C target-feature=+nontrapping-fptoint #![feature(test, stmt_expr_attributes)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/saturating-float-casts.rs b/tests/ui/numbers-arithmetic/saturating-float-casts.rs index cc248a9bea0..3a1af09d2d4 100644 --- a/tests/ui/numbers-arithmetic/saturating-float-casts.rs +++ b/tests/ui/numbers-arithmetic/saturating-float-casts.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags:-Zmir-opt-level=0 +//@ run-pass +//@ compile-flags:-Zmir-opt-level=0 #![feature(test, stmt_expr_attributes)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/shift-near-oflo.rs b/tests/ui/numbers-arithmetic/shift-near-oflo.rs index 55006a11342..5cca31af0e3 100644 --- a/tests/ui/numbers-arithmetic/shift-near-oflo.rs +++ b/tests/ui/numbers-arithmetic/shift-near-oflo.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug-assertions +//@ run-pass +//@ compile-flags: -C debug-assertions // Check that we do *not* overflow on a number of edge cases. // (compare with test/run-fail/overflowing-{lsh,rsh}*.rs) diff --git a/tests/ui/numbers-arithmetic/shift-various-types.rs b/tests/ui/numbers-arithmetic/shift-various-types.rs index 473bda3d76e..f046820ad90 100644 --- a/tests/ui/numbers-arithmetic/shift-various-types.rs +++ b/tests/ui/numbers-arithmetic/shift-various-types.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that we can do shifts by any integral type. diff --git a/tests/ui/numbers-arithmetic/shift.rs b/tests/ui/numbers-arithmetic/shift.rs index 2fc77928ef1..beb4f293811 100644 --- a/tests/ui/numbers-arithmetic/shift.rs +++ b/tests/ui/numbers-arithmetic/shift.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_upper_case_globals)] #![allow(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs index 6d0462b460e..dda54e2a579 100644 --- a/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs +++ b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.fixed b/tests/ui/numbers-arithmetic/suggest-float-literal.fixed index 9278262a6ff..da5f396a72c 100644 --- a/tests/ui/numbers-arithmetic/suggest-float-literal.fixed +++ b/tests/ui/numbers-arithmetic/suggest-float-literal.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/suggest-float-literal.rs b/tests/ui/numbers-arithmetic/suggest-float-literal.rs index 59e67f8d33e..4e95ca4b51e 100644 --- a/tests/ui/numbers-arithmetic/suggest-float-literal.rs +++ b/tests/ui/numbers-arithmetic/suggest-float-literal.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/numbers-arithmetic/u128-as-f32.rs b/tests/ui/numbers-arithmetic/u128-as-f32.rs index 839ce932d9e..88579f507eb 100644 --- a/tests/ui/numbers-arithmetic/u128-as-f32.rs +++ b/tests/ui/numbers-arithmetic/u128-as-f32.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] #![deny(overflowing_literals)] diff --git a/tests/ui/numbers-arithmetic/u128.rs b/tests/ui/numbers-arithmetic/u128.rs index d7e28055b21..81451df6a72 100644 --- a/tests/ui/numbers-arithmetic/u128.rs +++ b/tests/ui/numbers-arithmetic/u128.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(test)] diff --git a/tests/ui/numbers-arithmetic/u32-decr.rs b/tests/ui/numbers-arithmetic/u32-decr.rs index d9e09781877..2f68cf6f961 100644 --- a/tests/ui/numbers-arithmetic/u32-decr.rs +++ b/tests/ui/numbers-arithmetic/u32-decr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/u8-incr-decr.rs b/tests/ui/numbers-arithmetic/u8-incr-decr.rs index b16ec011d06..a3b86c531f3 100644 --- a/tests/ui/numbers-arithmetic/u8-incr-decr.rs +++ b/tests/ui/numbers-arithmetic/u8-incr-decr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/u8-incr.rs b/tests/ui/numbers-arithmetic/u8-incr.rs index 5242acf5b98..dd5d1680fac 100644 --- a/tests/ui/numbers-arithmetic/u8-incr.rs +++ b/tests/ui/numbers-arithmetic/u8-incr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass diff --git a/tests/ui/numbers-arithmetic/uint.rs b/tests/ui/numbers-arithmetic/uint.rs index d219eae8f33..c64361c2726 100644 --- a/tests/ui/numbers-arithmetic/uint.rs +++ b/tests/ui/numbers-arithmetic/uint.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 pub fn main() { let _x: usize = 10 as usize; } diff --git a/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs b/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs index a4d0a849484..5e753fd257f 100644 --- a/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs +++ b/tests/ui/numbers-arithmetic/unary-minus-suffix-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let a = 1; |
