about summary refs log tree commit diff
path: root/tests/ui/closures/2229_closure_analysis/run_pass
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/closures/2229_closure_analysis/run_pass
parente53d6dd35bb38b81dff4b00497f4c152e9009499 (diff)
downloadrust-ec2cc761bc7067712ecc7734502f703fe3b024c8.tar.gz
rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.zip
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
Diffstat (limited to 'tests/ui/closures/2229_closure_analysis/run_pass')
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/box.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/edition.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs6
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs4
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs4
30 files changed, 61 insertions, 61 deletions
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/box.rs b/tests/ui/closures/2229_closure_analysis/run_pass/box.rs
index 73aca288faa..be8822121a5 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/box.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/box.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test precise capture when using boxes
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs b/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs
index f8752fe1cec..b0763fd1033 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/by_value.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that ByValue captures compile successfully especially when the captures are
 // dereferenced within the closure.
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs
index 3cb1eb32952..981fa2d1240 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-struct.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that we can immutably borrow field of an instance of a structure from within a closure,
 // while having a mutable borrow to another field of the same instance outside the closure.
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs
index 0f79b7ae7b8..56c97d5d8e9 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple-mut.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that we can mutate an element of a tuple from within a closure
 // while immutably borrowing another element of the same tuple outside the closure.
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs
index 81f0328b9ba..1204ea28657 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture-disjoint-field-tuple.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that we can immutably borrow an element of a tuple from within a closure,
 // while having a mutable borrow to another element of the same tuple outside the closure.
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs b/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs
index cea02fbe15d..787cba4b056 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/capture_with_wildcard_match.rs
@@ -1,5 +1,5 @@
-// edition:2021
-//check-pass
+//@ edition:2021
+//@check-pass
 
 fn test1() {
     let foo : [Vec<u8>; 3] = ["String".into(), "String".into(), "String".into()];
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs
index 5c278bff90b..4fd70c0bb7e 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/destructure-pattern-closure-within-closure.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// check-pass
+//@ edition:2021
+//@ check-pass
 #![warn(unused)]
 
 fn main() {
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs b/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs
index dacc2c616b8..6d6779ca6bd 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/destructure_patterns.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// check-pass
+//@ edition:2021
+//@ check-pass
 #![warn(unused)]
 
 struct Point {
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs
index 6d4cf6fa553..671a4dbb0c7 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Tests that if a closure uses individual fields of the same object
 // then that case is handled properly.
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
index b5e97ec1c1b..1d7dcf2e3c5 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/drop_then_use_fake_reads.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// check-pass
+//@ edition:2021
+//@ check-pass
 
 #![feature(rustc_attrs)]
 #![allow(dropping_references)]
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs b/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs
index 20bbe1d89e4..8874fc57eee 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/edition.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that edition 2021 enables disjoint capture by default.
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs b/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs
index e19f5ff1bae..f0973e435f0 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/filter-on-struct-member.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test disjoint capture within an impl block
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs b/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
index 1286613cb13..c32846796f8 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/fru_syntax.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that functional record update/struct update syntax works inside
 // a closure when the feature `capture_disjoint_fields` is enabled.
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs
index c64475fda43..60190736963 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-87378.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// check-pass
+//@ edition:2021
+//@ check-pass
 
 union Union {
     value: u64,
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs
index 25fbb6cb906..1fa272117e9 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88372.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 
 fn solve<F>(validate: F) -> Option<u64>
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs
index 99962053077..ded9b2355e4 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88431.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// check-pass
+//@ edition:2021
+//@ check-pass
 
 use std::collections::HashMap;
 use std::future::Future;
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs
index f44c2af803b..0abb6db4694 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/issue-88476.rs
@@ -1,5 +1,5 @@
-// check-pass
-// edition:2021
+//@ check-pass
+//@ edition:2021
 
 use std::rc::Rc;
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs
index a386e9f40cc..7a4d7d9a81e 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs
@@ -1,5 +1,5 @@
-// edition:2021
-//check-pass
+//@ edition:2021
+//@check-pass
 #![warn(unused)]
 #![feature(rustc_attrs)]
 #![feature(btree_extract_if)]
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs
index f76965bdd3f..625a6f9592a 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/move_closure.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that move closures compile properly with `capture_disjoint_fields` enabled.
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs
index 624e0ff2256..683ca886021 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-1.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that closures can capture paths that are more precise than just one level
 // from the root variable.
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs
index bd8addd3781..947de10ee4a 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-2.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 #![allow(unused)]
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs
index 8fc0efb60b7..ac406837f90 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/multilevel-path-3.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 #![allow(unused)]
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs
index bc2386e5d23..9b3f6d046b4 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs
@@ -1,8 +1,8 @@
 // Test precise capture of a multi-variant enum (when remaining variants are
 // visibly uninhabited).
-// revisions: min_exhaustive_patterns exhaustive_patterns
-// edition:2021
-// run-pass
+//@ revisions: min_exhaustive_patterns exhaustive_patterns
+//@ edition:2021
+//@ run-pass
 #![cfg_attr(exhaustive_patterns, feature(exhaustive_patterns))]
 #![cfg_attr(min_exhaustive_patterns, feature(min_exhaustive_patterns))]
 //[min_exhaustive_patterns]~^ WARN the feature `min_exhaustive_patterns` is incomplete
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs
index 9f0c4d96aa5..3106908c621 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that we can mutate a place through a mut-borrow
 // that is captured by the closure
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs
index a85335438a9..4897598fc53 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/mut_ref_struct_mem.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that we can mutate a place through a mut-borrow
 // that is captured by the closure
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs
index a80b40bb469..d0370d71610 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/nested-closure.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test whether if we can do precise capture when using nested clsoure.
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs
index ed222b3148f..df42b80cfa4 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/struct-pattern-matching-with-methods.rs
@@ -1,5 +1,5 @@
-// edition:2021
-//check-pass
+//@ edition:2021
+//@check-pass
 #![warn(unused)]
 #![allow(dead_code)]
 #![feature(rustc_attrs)]
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs b/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs
index f3f44433ccf..758e5f9d98f 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/tuple-struct-pattern-matching-with-methods.rs
@@ -1,5 +1,5 @@
-// edition:2021
-//check-pass
+//@ edition:2021
+//@check-pass
 
 #[derive(Copy, Clone)]
 enum PointType {
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs b/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs
index 3f7ddf93f06..2af9b8d7088 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/unsafe_ptr.rs
@@ -1,5 +1,5 @@
-// edition:2021
-// run-pass
+//@ edition:2021
+//@ run-pass
 
 // Test that we can use raw ptrs when using `capture_disjoint_fields`.
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs b/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs
index 0206927cc59..659ee34c6ea 100644
--- a/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/use_of_mutable_borrow_and_fake_reads.rs
@@ -1,5 +1,5 @@
-// edition:2021
-//check-pass
+//@ edition:2021
+//@check-pass
 #![feature(rustc_attrs)]
 
 fn main() {