about summary refs log tree commit diff
path: root/tests/ui/functions-closures
diff options
context:
space:
mode:
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
commitec2cc761bc7067712ecc7734502f703fe3b024c8 (patch)
tree7ab55cd9562da45b86c959f1b98c199b2b03ca92 /tests/ui/functions-closures
parente53d6dd35bb38b81dff4b00497f4c152e9009499 (diff)
downloadrust-ec2cc761bc7067712ecc7734502f703fe3b024c8.tar.gz
rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.zip
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
Diffstat (limited to 'tests/ui/functions-closures')
-rw-r--r--tests/ui/functions-closures/call-closure-from-overloaded-op.rs2
-rw-r--r--tests/ui/functions-closures/capture-clauses-boxed-closures.rs2
-rw-r--r--tests/ui/functions-closures/capture-clauses-unboxed-closures.rs2
-rw-r--r--tests/ui/functions-closures/clone-closure.rs2
-rw-r--r--tests/ui/functions-closures/closure-bounds-can-capture-chan.rs4
-rw-r--r--tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs2
-rw-r--r--tests/ui/functions-closures/closure-expected-type/issue-38714.rs2
-rw-r--r--tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs2
-rw-r--r--tests/ui/functions-closures/closure-expected-type/supply-nothing.rs2
-rw-r--r--tests/ui/functions-closures/closure-immediate.rs2
-rw-r--r--tests/ui/functions-closures/closure-inference.rs2
-rw-r--r--tests/ui/functions-closures/closure-inference2.rs2
-rw-r--r--tests/ui/functions-closures/closure-reform.rs2
-rw-r--r--tests/ui/functions-closures/closure-returning-closure.rs2
-rw-r--r--tests/ui/functions-closures/closure-to-fn-coercion.rs2
-rw-r--r--tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs2
-rw-r--r--tests/ui/functions-closures/copy-closure.rs2
-rw-r--r--tests/ui/functions-closures/fn-abi.rs6
-rw-r--r--tests/ui/functions-closures/fn-bare-assign.rs2
-rw-r--r--tests/ui/functions-closures/fn-bare-coerce-to-block.rs4
-rw-r--r--tests/ui/functions-closures/fn-bare-item.rs2
-rw-r--r--tests/ui/functions-closures/fn-bare-size.rs2
-rw-r--r--tests/ui/functions-closures/fn-bare-spawn.rs2
-rw-r--r--tests/ui/functions-closures/fn-coerce-field.rs4
-rw-r--r--tests/ui/functions-closures/fn-item-type-cast.rs2
-rw-r--r--tests/ui/functions-closures/fn-item-type-coerce.rs4
-rw-r--r--tests/ui/functions-closures/fn-item-type-zero-sized.rs2
-rw-r--r--tests/ui/functions-closures/fn-lval.rs4
-rw-r--r--tests/ui/functions-closures/fn-type-infer.rs4
-rw-r--r--tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs2
-rw-r--r--tests/ui/functions-closures/nullable-pointer-opt-closures.rs2
-rw-r--r--tests/ui/functions-closures/parallel-codegen-closures.rs4
-rw-r--r--tests/ui/functions-closures/return-from-closure.rs2
33 files changed, 42 insertions, 42 deletions
diff --git a/tests/ui/functions-closures/call-closure-from-overloaded-op.rs b/tests/ui/functions-closures/call-closure-from-overloaded-op.rs
index 8e1c68fd77d..bf8ae119142 100644
--- a/tests/ui/functions-closures/call-closure-from-overloaded-op.rs
+++ b/tests/ui/functions-closures/call-closure-from-overloaded-op.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 
 fn foo() -> isize { 22 }
 
diff --git a/tests/ui/functions-closures/capture-clauses-boxed-closures.rs b/tests/ui/functions-closures/capture-clauses-boxed-closures.rs
index bcde504635d..b666884f64a 100644
--- a/tests/ui/functions-closures/capture-clauses-boxed-closures.rs
+++ b/tests/ui/functions-closures/capture-clauses-boxed-closures.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 
 fn each<T, F>(x: &[T], mut f: F) where F: FnMut(&T) {
     for val in x {
diff --git a/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs b/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs
index 206b3d7b613..6839d99ba27 100644
--- a/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs
+++ b/tests/ui/functions-closures/capture-clauses-unboxed-closures.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 fn each<'a,T,F:FnMut(&'a T)>(x: &'a [T], mut f: F) {
     for val in x {
         f(val)
diff --git a/tests/ui/functions-closures/clone-closure.rs b/tests/ui/functions-closures/clone-closure.rs
index 1e725d8056d..586592bda10 100644
--- a/tests/ui/functions-closures/clone-closure.rs
+++ b/tests/ui/functions-closures/clone-closure.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 // Check that closures implement `Clone`.
 
 #[derive(Clone)]
diff --git a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs
index ccb2e201d7d..4f38ea02d9c 100644
--- a/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs
+++ b/tests/ui/functions-closures/closure-bounds-can-capture-chan.rs
@@ -1,5 +1,5 @@
-// run-pass
-// pretty-expanded FIXME #23616
+//@ run-pass
+//@ pretty-expanded FIXME #23616
 
 use std::sync::mpsc::channel;
 
diff --git a/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs b/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs
index 6d5a9876c37..09675d49393 100644
--- a/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs
+++ b/tests/ui/functions-closures/closure-expected-type/expect-infer-supply-two-infers.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
 fn with_closure<A, F>(_: F)
diff --git a/tests/ui/functions-closures/closure-expected-type/issue-38714.rs b/tests/ui/functions-closures/closure-expected-type/issue-38714.rs
index e97785b5cac..47835ad8442 100644
--- a/tests/ui/functions-closures/closure-expected-type/issue-38714.rs
+++ b/tests/ui/functions-closures/closure-expected-type/issue-38714.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
 struct UsizeRef<'a> {
diff --git a/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs b/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs
index e9964531c3c..c72036e33f2 100644
--- a/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs
+++ b/tests/ui/functions-closures/closure-expected-type/supply-just-return-type.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 fn with_closure<F, R>(f: F) -> Result<char, R>
     where F: FnOnce(&char) -> Result<char, R>,
 {
diff --git a/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs b/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs
index 8665cfc21a7..34c94cd7864 100644
--- a/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs
+++ b/tests/ui/functions-closures/closure-expected-type/supply-nothing.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 fn with_closure<F>(f: F) -> u32
     where F: FnOnce(&u32, &u32) -> u32
 {
diff --git a/tests/ui/functions-closures/closure-immediate.rs b/tests/ui/functions-closures/closure-immediate.rs
index 428fc6bdef3..0bda017de5a 100644
--- a/tests/ui/functions-closures/closure-immediate.rs
+++ b/tests/ui/functions-closures/closure-immediate.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 
 // After the work to reoptimize structs, it became possible for immediate logic to fail.
 // This test verifies that it actually works.
diff --git a/tests/ui/functions-closures/closure-inference.rs b/tests/ui/functions-closures/closure-inference.rs
index 1877414f099..b7ffbfdb87f 100644
--- a/tests/ui/functions-closures/closure-inference.rs
+++ b/tests/ui/functions-closures/closure-inference.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(unused_braces)]
 
 fn foo(i: isize) -> isize { i + 1 }
diff --git a/tests/ui/functions-closures/closure-inference2.rs b/tests/ui/functions-closures/closure-inference2.rs
index 4ce132e86ca..8db7016be6d 100644
--- a/tests/ui/functions-closures/closure-inference2.rs
+++ b/tests/ui/functions-closures/closure-inference2.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 // Test a rather underspecified example:
 #![allow(unused_braces)]
 
diff --git a/tests/ui/functions-closures/closure-reform.rs b/tests/ui/functions-closures/closure-reform.rs
index 0bb6159ff4a..3277b7bff47 100644
--- a/tests/ui/functions-closures/closure-reform.rs
+++ b/tests/ui/functions-closures/closure-reform.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(unused_variables)]
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
diff --git a/tests/ui/functions-closures/closure-returning-closure.rs b/tests/ui/functions-closures/closure-returning-closure.rs
index 17db81687ab..c4ec792c102 100644
--- a/tests/ui/functions-closures/closure-returning-closure.rs
+++ b/tests/ui/functions-closures/closure-returning-closure.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 fn main() {
     let f = |_||x, y| x+y;
     assert_eq!(f(())(1, 2), 3);
diff --git a/tests/ui/functions-closures/closure-to-fn-coercion.rs b/tests/ui/functions-closures/closure-to-fn-coercion.rs
index 87ba488b5ae..4b66294ea7b 100644
--- a/tests/ui/functions-closures/closure-to-fn-coercion.rs
+++ b/tests/ui/functions-closures/closure-to-fn-coercion.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 use std::mem;
 
 const FOO: fn(u8) -> u8 = |v: u8| { v };
diff --git a/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs b/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs
index e7a9383950f..b8a11ef5a00 100644
--- a/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs
+++ b/tests/ui/functions-closures/closure_to_fn_coercion-expected-types.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(unused_variables)]
 // Ensure that we deduce expected argument types when a `fn()` type is expected (#41755)
 
diff --git a/tests/ui/functions-closures/copy-closure.rs b/tests/ui/functions-closures/copy-closure.rs
index 72da02421b7..313d39eac3d 100644
--- a/tests/ui/functions-closures/copy-closure.rs
+++ b/tests/ui/functions-closures/copy-closure.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 // Check that closures implement `Copy`.
 
 fn call<T, F: FnOnce() -> T>(f: F) -> T { f() }
diff --git a/tests/ui/functions-closures/fn-abi.rs b/tests/ui/functions-closures/fn-abi.rs
index ac3a4be3346..d33158e8917 100644
--- a/tests/ui/functions-closures/fn-abi.rs
+++ b/tests/ui/functions-closures/fn-abi.rs
@@ -1,9 +1,9 @@
-// run-pass
+//@ run-pass
 // Ensure that declarations and types which use `extern fn` both have the same
 // ABI (#9309).
 
-// pretty-expanded FIXME #23616
-// aux-build:fn-abi.rs
+//@ pretty-expanded FIXME #23616
+//@ aux-build:fn-abi.rs
 
 extern crate fn_abi;
 
diff --git a/tests/ui/functions-closures/fn-bare-assign.rs b/tests/ui/functions-closures/fn-bare-assign.rs
index f5dab3c8402..d09e0a3bd92 100644
--- a/tests/ui/functions-closures/fn-bare-assign.rs
+++ b/tests/ui/functions-closures/fn-bare-assign.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 
 fn f(i: isize, called: &mut bool) {
     assert_eq!(i, 10);
diff --git a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs
index 922e016ddc8..18015a41564 100644
--- a/tests/ui/functions-closures/fn-bare-coerce-to-block.rs
+++ b/tests/ui/functions-closures/fn-bare-coerce-to-block.rs
@@ -1,5 +1,5 @@
-// run-pass
-// pretty-expanded FIXME #23616
+//@ run-pass
+//@ pretty-expanded FIXME #23616
 
 fn bare() {}
 
diff --git a/tests/ui/functions-closures/fn-bare-item.rs b/tests/ui/functions-closures/fn-bare-item.rs
index a6e6495a40a..a0856463bc2 100644
--- a/tests/ui/functions-closures/fn-bare-item.rs
+++ b/tests/ui/functions-closures/fn-bare-item.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 fn f() {
     println!("This is a bare function");
 }
diff --git a/tests/ui/functions-closures/fn-bare-size.rs b/tests/ui/functions-closures/fn-bare-size.rs
index 2ba56eaaed4..75725832365 100644
--- a/tests/ui/functions-closures/fn-bare-size.rs
+++ b/tests/ui/functions-closures/fn-bare-size.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 
 use std::mem;
 
diff --git a/tests/ui/functions-closures/fn-bare-spawn.rs b/tests/ui/functions-closures/fn-bare-spawn.rs
index 0d46fe22087..902e5702fbf 100644
--- a/tests/ui/functions-closures/fn-bare-spawn.rs
+++ b/tests/ui/functions-closures/fn-bare-spawn.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 // This is what the signature to spawn should look like with bare functions
 
 
diff --git a/tests/ui/functions-closures/fn-coerce-field.rs b/tests/ui/functions-closures/fn-coerce-field.rs
index 38bde7b9e8f..dd7be374c84 100644
--- a/tests/ui/functions-closures/fn-coerce-field.rs
+++ b/tests/ui/functions-closures/fn-coerce-field.rs
@@ -1,6 +1,6 @@
-// run-pass
+//@ run-pass
 #![allow(dead_code)]
-// pretty-expanded FIXME #23616
+//@ pretty-expanded FIXME #23616
 #![allow(non_camel_case_types)]
 
 struct r<F> where F: FnOnce() {
diff --git a/tests/ui/functions-closures/fn-item-type-cast.rs b/tests/ui/functions-closures/fn-item-type-cast.rs
index 4d50ea97b8b..ccd3364aaf5 100644
--- a/tests/ui/functions-closures/fn-item-type-cast.rs
+++ b/tests/ui/functions-closures/fn-item-type-cast.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
 // Test explicit coercions from a fn item type to a fn pointer type.
diff --git a/tests/ui/functions-closures/fn-item-type-coerce.rs b/tests/ui/functions-closures/fn-item-type-coerce.rs
index 7a096764e45..e858f9e9e19 100644
--- a/tests/ui/functions-closures/fn-item-type-coerce.rs
+++ b/tests/ui/functions-closures/fn-item-type-coerce.rs
@@ -1,8 +1,8 @@
-// run-pass
+//@ run-pass
 #![allow(unused_variables)]
 // Test implicit coercions from a fn item type to a fn pointer type.
 
-// pretty-expanded FIXME #23616
+//@ pretty-expanded FIXME #23616
 
 fn foo(x: isize) -> isize { x * 2 }
 fn bar(x: isize) -> isize { x * 4 }
diff --git a/tests/ui/functions-closures/fn-item-type-zero-sized.rs b/tests/ui/functions-closures/fn-item-type-zero-sized.rs
index bd9f1ed663d..11f817da7aa 100644
--- a/tests/ui/functions-closures/fn-item-type-zero-sized.rs
+++ b/tests/ui/functions-closures/fn-item-type-zero-sized.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 // Test that fn item types are zero-sized.
 
 use std::mem::{size_of, size_of_val};
diff --git a/tests/ui/functions-closures/fn-lval.rs b/tests/ui/functions-closures/fn-lval.rs
index 01079eea457..aa080f6b985 100644
--- a/tests/ui/functions-closures/fn-lval.rs
+++ b/tests/ui/functions-closures/fn-lval.rs
@@ -1,8 +1,8 @@
-// run-pass
+//@ run-pass
 
 
 
-// pretty-expanded FIXME #23616
+//@ pretty-expanded FIXME #23616
 
 fn foo(_f: fn(isize) -> isize) { }
 
diff --git a/tests/ui/functions-closures/fn-type-infer.rs b/tests/ui/functions-closures/fn-type-infer.rs
index fe6567f22b5..b1624e476ef 100644
--- a/tests/ui/functions-closures/fn-type-infer.rs
+++ b/tests/ui/functions-closures/fn-type-infer.rs
@@ -1,5 +1,5 @@
-// run-pass
-// pretty-expanded FIXME #23616
+//@ run-pass
+//@ pretty-expanded FIXME #23616
 
 #![allow(unused_variables)]
 
diff --git a/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs b/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs
index 4ac07123d9d..dfcbc037412 100644
--- a/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs
+++ b/tests/ui/functions-closures/implied-bounds-closure-arg-outlives.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 // Test that we are able to handle the relationships between free
 // regions bound in a closure callback.
 
diff --git a/tests/ui/functions-closures/nullable-pointer-opt-closures.rs b/tests/ui/functions-closures/nullable-pointer-opt-closures.rs
index 87dacfba25b..2cafe1b7aba 100644
--- a/tests/ui/functions-closures/nullable-pointer-opt-closures.rs
+++ b/tests/ui/functions-closures/nullable-pointer-opt-closures.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 
 use std::mem;
 
diff --git a/tests/ui/functions-closures/parallel-codegen-closures.rs b/tests/ui/functions-closures/parallel-codegen-closures.rs
index 79759daba50..1842ac4db60 100644
--- a/tests/ui/functions-closures/parallel-codegen-closures.rs
+++ b/tests/ui/functions-closures/parallel-codegen-closures.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(dead_code)]
 #![allow(unused_variables)]
 #![allow(stable_features)]
@@ -6,7 +6,7 @@
 // Tests parallel codegen - this can fail if the symbol for the anonymous
 // closure in `sum` pollutes the second codegen unit from the first.
 
-// compile-flags: -C codegen_units=2
+//@ compile-flags: -C codegen_units=2
 
 #![feature(iter_arith)]
 
diff --git a/tests/ui/functions-closures/return-from-closure.rs b/tests/ui/functions-closures/return-from-closure.rs
index 656a95f120a..aaf6a31eb3f 100644
--- a/tests/ui/functions-closures/return-from-closure.rs
+++ b/tests/ui/functions-closures/return-from-closure.rs
@@ -1,4 +1,4 @@
-// run-pass
+//@ run-pass
 #![allow(non_upper_case_globals)]
 // just to make sure that `return` is only returning from the closure,
 // not the surrounding function.