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/iterators | |
| parent | e53d6dd35bb38b81dff4b00497f4c152e9009499 (diff) | |
| download | rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.tar.gz rust-ec2cc761bc7067712ecc7734502f703fe3b024c8.zip | |
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
Diffstat (limited to 'tests/ui/iterators')
24 files changed, 52 insertions, 52 deletions
diff --git a/tests/ui/iterators/array-of-ranges.rs b/tests/ui/iterators/array-of-ranges.rs index 037540a3e89..1ec1032940a 100644 --- a/tests/ui/iterators/array-of-ranges.rs +++ b/tests/ui/iterators/array-of-ranges.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { for _ in [0..1] {} diff --git a/tests/ui/iterators/array.rs b/tests/ui/iterators/array.rs index 5985c74e11f..c83c5889967 100644 --- a/tests/ui/iterators/array.rs +++ b/tests/ui/iterators/array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { for _ in [1, 2] {} diff --git a/tests/ui/iterators/into-iter-on-arrays-2018.rs b/tests/ui/iterators/into-iter-on-arrays-2018.rs index 60995170a51..d2354405236 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2018.rs +++ b/tests/ui/iterators/into-iter-on-arrays-2018.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 use std::array::IntoIter; use std::ops::Deref; diff --git a/tests/ui/iterators/into-iter-on-arrays-2021.rs b/tests/ui/iterators/into-iter-on-arrays-2021.rs index 158317efe47..1bda0ebf6cb 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2021.rs +++ b/tests/ui/iterators/into-iter-on-arrays-2021.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 use std::array::IntoIter; use std::ops::Deref; diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.fixed b/tests/ui/iterators/into-iter-on-arrays-lint.fixed index 5b91aaf9ea5..be754a28ffa 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.fixed +++ b/tests/ui/iterators/into-iter-on-arrays-lint.fixed @@ -1,6 +1,6 @@ -// run-pass -// run-rustfix -// rustfix-only-machine-applicable +//@ run-pass +//@ run-rustfix +//@ rustfix-only-machine-applicable #[allow(unused_must_use, unused_allocation)] fn main() { diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.rs b/tests/ui/iterators/into-iter-on-arrays-lint.rs index 25b0cef73d7..e4dddb325cd 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.rs +++ b/tests/ui/iterators/into-iter-on-arrays-lint.rs @@ -1,6 +1,6 @@ -// run-pass -// run-rustfix -// rustfix-only-machine-applicable +//@ run-pass +//@ run-rustfix +//@ rustfix-only-machine-applicable #[allow(unused_must_use, unused_allocation)] fn main() { diff --git a/tests/ui/iterators/into-iterator-type-inference-shift.rs b/tests/ui/iterators/into-iterator-type-inference-shift.rs index 9151172fd15..b550dc27f5c 100644 --- a/tests/ui/iterators/into-iterator-type-inference-shift.rs +++ b/tests/ui/iterators/into-iterator-type-inference-shift.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_must_use)] #![allow(dead_code)] #![allow(unused_mut)] @@ -8,7 +8,7 @@ // propagation yet, and so we just saw a type variable, yielding an // error. -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 trait IntoIterator { type Iter: Iterator; diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.fixed b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed index 513b5bd13d8..81e532a8923 100644 --- a/tests/ui/iterators/invalid-iterator-chain-fixable.fixed +++ b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::hash_set::Iter; use std::collections::HashSet; diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.rs b/tests/ui/iterators/invalid-iterator-chain-fixable.rs index 79b861702c7..06b493d5889 100644 --- a/tests/ui/iterators/invalid-iterator-chain-fixable.rs +++ b/tests/ui/iterators/invalid-iterator-chain-fixable.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix use std::collections::hash_set::Iter; use std::collections::HashSet; diff --git a/tests/ui/iterators/issue-58952-filter-type-length.rs b/tests/ui/iterators/issue-58952-filter-type-length.rs index 8e9cc84ec03..9904eddb598 100644 --- a/tests/ui/iterators/issue-58952-filter-type-length.rs +++ b/tests/ui/iterators/issue-58952-filter-type-length.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-compare-mode-next-solver (hangs) +//@ run-pass +//@ ignore-compare-mode-next-solver (hangs) //! This snippet causes the type length to blowup exponentially, //! so check that we don't accidentally exceed the type length limit. diff --git a/tests/ui/iterators/iter-cloned-type-inference.rs b/tests/ui/iterators/iter-cloned-type-inference.rs index 898e3371971..10f95588118 100644 --- a/tests/ui/iterators/iter-cloned-type-inference.rs +++ b/tests/ui/iterators/iter-cloned-type-inference.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(stable_features)] // Test to see that the element type of .cloned() can be inferred diff --git a/tests/ui/iterators/iter-count-overflow-debug.rs b/tests/ui/iterators/iter-count-overflow-debug.rs index 8e59c11e9dc..333d3f258ad 100644 --- a/tests/ui/iterators/iter-count-overflow-debug.rs +++ b/tests/ui/iterators/iter-count-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// needs-unwind -// compile-flags: -C debug_assertions=yes -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/tests/ui/iterators/iter-count-overflow-ndebug.rs b/tests/ui/iterators/iter-count-overflow-ndebug.rs index dcaaff671b2..a4d5db2221d 100644 --- a/tests/ui/iterators/iter-count-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-count-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// compile-flags: -C debug_assertions=no -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ compile-flags: -C debug_assertions=no -C opt-level=3 fn main() { assert_eq!((0..usize::MAX).by_ref().count(), usize::MAX); diff --git a/tests/ui/iterators/iter-map-fold-type-length.rs b/tests/ui/iterators/iter-map-fold-type-length.rs index 8ce4fcd8731..6444fb9dada 100644 --- a/tests/ui/iterators/iter-map-fold-type-length.rs +++ b/tests/ui/iterators/iter-map-fold-type-length.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass //! Check that type lengths don't explode with `Map` folds. //! //! The normal limit is a million, and this test used to exceed 1.5 million, but diff --git a/tests/ui/iterators/iter-position-overflow-debug.rs b/tests/ui/iterators/iter-position-overflow-debug.rs index 7a871e744c9..f27f2233c40 100644 --- a/tests/ui/iterators/iter-position-overflow-debug.rs +++ b/tests/ui/iterators/iter-position-overflow-debug.rs @@ -1,7 +1,7 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// needs-unwind -// compile-flags: -C debug_assertions=yes -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes -C opt-level=3 use std::panic; diff --git a/tests/ui/iterators/iter-position-overflow-ndebug.rs b/tests/ui/iterators/iter-position-overflow-ndebug.rs index e610c35599c..f15cd9ec2a2 100644 --- a/tests/ui/iterators/iter-position-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-position-overflow-ndebug.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// compile-flags: -C debug_assertions=no -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ compile-flags: -C debug_assertions=no -C opt-level=3 fn main() { let n = usize::MAX as u64; diff --git a/tests/ui/iterators/iter-range.rs b/tests/ui/iterators/iter-range.rs index 993d93790e0..9594729c06c 100644 --- a/tests/ui/iterators/iter-range.rs +++ b/tests/ui/iterators/iter-range.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn range_<F>(a: isize, b: isize, mut it: F) where F: FnMut(isize) { diff --git a/tests/ui/iterators/iter-step-overflow-debug.rs b/tests/ui/iterators/iter-step-overflow-debug.rs index 6aa349ebed2..f72e389f551 100644 --- a/tests/ui/iterators/iter-step-overflow-debug.rs +++ b/tests/ui/iterators/iter-step-overflow-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes use std::panic; diff --git a/tests/ui/iterators/iter-step-overflow-ndebug.rs b/tests/ui/iterators/iter-step-overflow-ndebug.rs index 33e708769ba..509b532aaa2 100644 --- a/tests/ui/iterators/iter-step-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-step-overflow-ndebug.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=no +//@ run-pass +//@ compile-flags: -C debug_assertions=no fn main() { let mut it = u8::MAX..; diff --git a/tests/ui/iterators/iter-sum-overflow-debug.rs b/tests/ui/iterators/iter-sum-overflow-debug.rs index 24c764ff958..32efc925a45 100644 --- a/tests/ui/iterators/iter-sum-overflow-debug.rs +++ b/tests/ui/iterators/iter-sum-overflow-debug.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C debug_assertions=yes +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C debug_assertions=yes use std::panic; diff --git a/tests/ui/iterators/iter-sum-overflow-ndebug.rs b/tests/ui/iterators/iter-sum-overflow-ndebug.rs index 69f4744cc2a..821425ea84e 100644 --- a/tests/ui/iterators/iter-sum-overflow-ndebug.rs +++ b/tests/ui/iterators/iter-sum-overflow-ndebug.rs @@ -1,5 +1,5 @@ -// run-pass -// compile-flags: -C debug_assertions=no +//@ run-pass +//@ compile-flags: -C debug_assertions=no fn main() { assert_eq!([1i32, i32::MAX].iter().sum::<i32>(), diff --git a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs index be45c075d73..8fffd19e2be 100644 --- a/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs +++ b/tests/ui/iterators/iter-sum-overflow-overflow-checks.rs @@ -1,6 +1,6 @@ -// run-pass -// needs-unwind -// compile-flags: -C overflow-checks +//@ run-pass +//@ needs-unwind +//@ compile-flags: -C overflow-checks use std::panic; diff --git a/tests/ui/iterators/rsplit-clone.rs b/tests/ui/iterators/rsplit-clone.rs index 911da742957..bdef21f3dd6 100644 --- a/tests/ui/iterators/rsplit-clone.rs +++ b/tests/ui/iterators/rsplit-clone.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // RSplit<T, P> previously required T: Clone in order to be Clone diff --git a/tests/ui/iterators/skip-count-overflow.rs b/tests/ui/iterators/skip-count-overflow.rs index 64dee3e3c8b..6f8ca7173fe 100644 --- a/tests/ui/iterators/skip-count-overflow.rs +++ b/tests/ui/iterators/skip-count-overflow.rs @@ -1,6 +1,6 @@ -// run-pass -// only-32bit too impatient for 2⁶⁴ items -// compile-flags: -C overflow-checks -C opt-level=3 +//@ run-pass +//@ only-32bit too impatient for 2⁶⁴ items +//@ compile-flags: -C overflow-checks -C opt-level=3 fn main() { let i = (0..usize::MAX).chain(0..10).skip(usize::MAX); |
