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/expr | |
| parent | e53d6dd35bb38b81dff4b00497f4c152e9009499 (diff) | |
| download | rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.tar.gz rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.zip | |
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
Diffstat (limited to 'tests/ui/expr')
23 files changed, 32 insertions, 32 deletions
diff --git a/tests/ui/expr/compound-assignment/eval-order.rs b/tests/ui/expr/compound-assignment/eval-order.rs index 658adae193e..c7940a06a89 100644 --- a/tests/ui/expr/compound-assignment/eval-order.rs +++ b/tests/ui/expr/compound-assignment/eval-order.rs @@ -1,6 +1,6 @@ // Test evaluation order of operands of the compound assignment operators -// run-pass +//@ run-pass use std::ops::AddAssign; diff --git a/tests/ui/expr/if-bot.rs b/tests/ui/expr/if-bot.rs index 0f09db530d4..82c27d57aa8 100644 --- a/tests/ui/expr/if-bot.rs +++ b/tests/ui/expr/if-bot.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let i: isize = if false { panic!() } else { 5 }; diff --git a/tests/ui/expr/if/attrs/builtin-if-attr.rs b/tests/ui/expr/if/attrs/builtin-if-attr.rs index 7e290661501..3c6606acdca 100644 --- a/tests/ui/expr/if/attrs/builtin-if-attr.rs +++ b/tests/ui/expr/if/attrs/builtin-if-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { #[allow(unused_variables)] diff --git a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs index 1f77a1bb342..72d83215ade 100644 --- a/tests/ui/expr/if/attrs/cfg-false-if-attr.rs +++ b/tests/ui/expr/if/attrs/cfg-false-if-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] fn simple_attr() { diff --git a/tests/ui/expr/if/attrs/gate-whole-expr.rs b/tests/ui/expr/if/attrs/gate-whole-expr.rs index 63772d54b53..bab01592c24 100644 --- a/tests/ui/expr/if/attrs/gate-whole-expr.rs +++ b/tests/ui/expr/if/attrs/gate-whole-expr.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let x = 1; diff --git a/tests/ui/expr/if/attrs/let-chains-attr.rs b/tests/ui/expr/if/attrs/let-chains-attr.rs index 2cd8731141a..b3dbd53e579 100644 --- a/tests/ui/expr/if/attrs/let-chains-attr.rs +++ b/tests/ui/expr/if/attrs/let-chains-attr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(let_chains)] diff --git a/tests/ui/expr/if/expr-if-panic-fn.rs b/tests/ui/expr/if/expr-if-panic-fn.rs index 36e49785a49..4f3d7fd48e3 100644 --- a/tests/ui/expr/if/expr-if-panic-fn.rs +++ b/tests/ui/expr/if/expr-if-panic-fn.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn f() -> ! { panic!() diff --git a/tests/ui/expr/if/expr-if-panic-pass.rs b/tests/ui/expr/if/expr-if-panic-pass.rs index 6069cd835e1..faf3cf12550 100644 --- a/tests/ui/expr/if/expr-if-panic-pass.rs +++ b/tests/ui/expr/if/expr-if-panic-pass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn test_if_panic() { let x = if false { panic!() } else { 10 }; diff --git a/tests/ui/expr/if/expr-if-panic.rs b/tests/ui/expr/if/expr-if-panic.rs index 520ee0870ee..0b43d1d6b00 100644 --- a/tests/ui/expr/if/expr-if-panic.rs +++ b/tests/ui/expr/if/expr-if-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:explicit panic -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:explicit panic +//@ ignore-emscripten no processes fn main() { let _x = if false { diff --git a/tests/ui/expr/if/expr-if.rs b/tests/ui/expr/if/expr-if.rs index 2b8474ff453..ae869c4b77a 100644 --- a/tests/ui/expr/if/expr-if.rs +++ b/tests/ui/expr/if/expr-if.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Tests for if as expressions fn test_if() { let rs: bool = if true { true } else { false }; assert!((rs)); } diff --git a/tests/ui/expr/if/if-check-panic.rs b/tests/ui/expr/if/if-check-panic.rs index 037cd427ccf..4b400deaca4 100644 --- a/tests/ui/expr/if/if-check-panic.rs +++ b/tests/ui/expr/if/if-check-panic.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:Number is odd -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:Number is odd +//@ ignore-emscripten no processes fn even(x: usize) -> bool { if x < 2 { diff --git a/tests/ui/expr/if/if-check.rs b/tests/ui/expr/if/if-check.rs index 6593225e7dd..f3fb3a59ff0 100644 --- a/tests/ui/expr/if/if-check.rs +++ b/tests/ui/expr/if/if-check.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn even(x: usize) -> bool { if x < 2 { diff --git a/tests/ui/expr/if/if-cond-bot.rs b/tests/ui/expr/if/if-cond-bot.rs index bcd11467852..ddb5559ffca 100644 --- a/tests/ui/expr/if/if-cond-bot.rs +++ b/tests/ui/expr/if/if-cond-bot.rs @@ -1,6 +1,6 @@ -// run-fail -// error-pattern:quux -// ignore-emscripten no processes +//@ run-fail +//@ error-pattern:quux +//@ ignore-emscripten no processes fn my_err(s: String) -> ! { println!("{}", s); diff --git a/tests/ui/expr/if/if-let.rs b/tests/ui/expr/if/if-let.rs index 7fdd2be955b..a21445f188a 100644 --- a/tests/ui/expr/if/if-let.rs +++ b/tests/ui/expr/if/if-let.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn macros() { macro_rules! foo { diff --git a/tests/ui/expr/if/if-loop.rs b/tests/ui/expr/if/if-loop.rs index 06d0bdf456c..f4121c92d17 100644 --- a/tests/ui/expr/if/if-loop.rs +++ b/tests/ui/expr/if/if-loop.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This used to ICE because the "if" being unreachable was not handled correctly fn err() { diff --git a/tests/ui/expr/if/if-ret.rs b/tests/ui/expr/if/if-ret.rs index 896072ce728..3aad21d34a2 100644 --- a/tests/ui/expr/if/if-ret.rs +++ b/tests/ui/expr/if/if-ret.rs @@ -1,7 +1,7 @@ -// run-pass +//@ run-pass #![allow(unused_parens)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 fn foo() { if (return) { } } //~ WARNING unreachable block in `if` diff --git a/tests/ui/expr/if/if-typeck.rs b/tests/ui/expr/if/if-typeck.rs index d8c262bd6b3..ba828f11e79 100644 --- a/tests/ui/expr/if/if-typeck.rs +++ b/tests/ui/expr/if/if-typeck.rs @@ -1,4 +1,4 @@ -// error-pattern:mismatched types +//@ error-pattern:mismatched types // issue #513 fn f() { } diff --git a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed index b81515cda9a..47217e05f9d 100644 --- a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed +++ b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| { let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs index e47ad562fb0..0069e834741 100644 --- a/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs +++ b/tests/ui/expr/malformed_closure/missing_block_in_fn_call.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed index a7a9db7d977..fcc55f28f01 100644 --- a/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed +++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed @@ -8,7 +8,7 @@ // https://github.com/rust-lang/rust/issues/88065 // https://github.com/rust-lang/rust/issues/107959 -// run-rustfix +//@ run-rustfix fn main() { // Closure with multiple expressions delimited by semicolon. diff --git a/tests/ui/expr/malformed_closure/missing_braces_around_block.rs b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs index b5690b2eca7..97639d01f74 100644 --- a/tests/ui/expr/malformed_closure/missing_braces_around_block.rs +++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs @@ -8,7 +8,7 @@ // https://github.com/rust-lang/rust/issues/88065 // https://github.com/rust-lang/rust/issues/107959 -// run-rustfix +//@ run-rustfix fn main() { // Closure with multiple expressions delimited by semicolon. diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed index 8014dc87c08..9d85f95ff24 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed +++ b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map(|x| { let y = x; //~ ERROR expected expression, found `let` statement diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs index 9e4aca888ad..728ea868441 100644 --- a/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs +++ b/tests/ui/expr/malformed_closure/ruby_style_closure_parse_error.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = vec![1, 2, 3].into_iter().map({|x| let y = x; //~ ERROR expected expression, found `let` statement |
