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/pattern/usefulness | |
| parent | e53d6dd35bb38b81dff4b00497f4c152e9009499 (diff) | |
[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
Diffstat (limited to 'tests/ui/pattern/usefulness')
32 files changed, 36 insertions, 36 deletions
diff --git a/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs b/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs index 247b7f21f68..c951cb567fc 100644 --- a/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs +++ b/tests/ui/pattern/usefulness/always-inhabited-union-ref.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns // The precise semantics of inhabitedness with respect to unions and references is currently // undecided. This test file currently checks a conservative choice. diff --git a/tests/ui/pattern/usefulness/const-pat-ice.rs b/tests/ui/pattern/usefulness/const-pat-ice.rs index abfacf3936b..69f16185676 100644 --- a/tests/ui/pattern/usefulness/const-pat-ice.rs +++ b/tests/ui/pattern/usefulness/const-pat-ice.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass const FOO: &&&u32 = &&&42; diff --git a/tests/ui/pattern/usefulness/const-private-fields.rs b/tests/ui/pattern/usefulness/const-private-fields.rs index 06c832ca46a..79a1d6e3ed7 100644 --- a/tests/ui/pattern/usefulness/const-private-fields.rs +++ b/tests/ui/pattern/usefulness/const-private-fields.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // // Check that we don't ignore private fields in usefulness checking #![deny(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/doc-hidden-fields.rs b/tests/ui/pattern/usefulness/doc-hidden-fields.rs index 4163b87dc85..549e0d1af55 100644 --- a/tests/ui/pattern/usefulness/doc-hidden-fields.rs +++ b/tests/ui/pattern/usefulness/doc-hidden-fields.rs @@ -1,4 +1,4 @@ -// aux-build:hidden.rs +//@ aux-build:hidden.rs extern crate hidden; diff --git a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs index 5d4181a30f0..56842917f50 100644 --- a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs +++ b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs @@ -1,4 +1,4 @@ -// aux-build:hidden.rs +//@ aux-build:hidden.rs extern crate hidden; diff --git a/tests/ui/pattern/usefulness/empty-match-check-notes.rs b/tests/ui/pattern/usefulness/empty-match-check-notes.rs index c30cdfc2e4f..ea797bc7dd5 100644 --- a/tests/ui/pattern/usefulness/empty-match-check-notes.rs +++ b/tests/ui/pattern/usefulness/empty-match-check-notes.rs @@ -1,5 +1,5 @@ -// aux-build:empty.rs -// revisions: normal exhaustive_patterns +//@ aux-build:empty.rs +//@ revisions: normal exhaustive_patterns // // This tests a match with no arms on various types, and checks NOTEs. #![feature(never_type)] diff --git a/tests/ui/pattern/usefulness/empty-match.rs b/tests/ui/pattern/usefulness/empty-match.rs index 20ab702c9c8..9b22b47a12b 100644 --- a/tests/ui/pattern/usefulness/empty-match.rs +++ b/tests/ui/pattern/usefulness/empty-match.rs @@ -1,4 +1,4 @@ -// revisions: normal exhaustive_patterns +//@ revisions: normal exhaustive_patterns // // This tests a match with no arms on various types. #![feature(never_type)] diff --git a/tests/ui/pattern/usefulness/empty-types.rs b/tests/ui/pattern/usefulness/empty-types.rs index c66fd1edc19..170a663e754 100644 --- a/tests/ui/pattern/usefulness/empty-types.rs +++ b/tests/ui/pattern/usefulness/empty-types.rs @@ -1,4 +1,4 @@ -// revisions: normal min_exh_pats exhaustive_patterns +//@ revisions: normal min_exh_pats exhaustive_patterns // gate-test-min_exhaustive_patterns // // This tests correct handling of empty types in exhaustiveness checking. diff --git a/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs b/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs index 37fcb4b4af9..7c9ea341ddb 100644 --- a/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs +++ b/tests/ui/pattern/usefulness/integer-ranges/issue-117648-overlapping_range_endpoints-false-positive.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match (0i8, 0i8) { (0, _) => {} diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs index 3778dede721..40f086dcc71 100644 --- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs +++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs @@ -1,4 +1,4 @@ -// revisions: deny +//@ revisions: deny #![feature(exclusive_range_pattern)] #![allow(overlapping_range_endpoints)] diff --git a/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs b/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs index d400ef0bbd6..ef90e0e6ea7 100644 --- a/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs +++ b/tests/ui/pattern/usefulness/irrefutable-let-patterns.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(irrefutable_let_patterns)] diff --git a/tests/ui/pattern/usefulness/irrefutable-unit.rs b/tests/ui/pattern/usefulness/irrefutable-unit.rs index dd8f03b6dbd..b4e72c0aa2a 100644 --- a/tests/ui/pattern/usefulness/irrefutable-unit.rs +++ b/tests/ui/pattern/usefulness/irrefutable-unit.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { let ((),()) = ((),()); diff --git a/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs index 39ad2d4abf3..984feef5f47 100644 --- a/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs +++ b/tests/ui/pattern/usefulness/issue-118437-exponential-time-on-diagonal-match.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass struct BaseCommand { field01: bool, field02: bool, diff --git a/tests/ui/pattern/usefulness/issue-30240-rpass.rs b/tests/ui/pattern/usefulness/issue-30240-rpass.rs index ab16614fd30..c8342295b91 100644 --- a/tests/ui/pattern/usefulness/issue-30240-rpass.rs +++ b/tests/ui/pattern/usefulness/issue-30240-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { let &ref a = &[0i32] as &[_]; assert_eq!(a, &[0i32] as &[_]); diff --git a/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs b/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs index 5b0482de220..e5adf153965 100644 --- a/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs +++ b/tests/ui/pattern/usefulness/issue-53820-slice-pattern-large-array.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This used to cause a stack overflow during exhaustiveness checking in the compiler. diff --git a/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs b/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs index 54dfa889ee3..ebe6ce0629e 100644 --- a/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs +++ b/tests/ui/pattern/usefulness/issue-65413-constants-and-slices-exhaustiveness.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/issue-66501.rs b/tests/ui/pattern/usefulness/issue-66501.rs index ffcfd4ad83e..e7a36ba3463 100644 --- a/tests/ui/pattern/usefulness/issue-66501.rs +++ b/tests/ui/pattern/usefulness/issue-66501.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(unreachable_patterns)] diff --git a/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs b/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs index e2ff9ac87ef..1db5dff3bf8 100644 --- a/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs +++ b/tests/ui/pattern/usefulness/issue-71930-type-of-match-scrutinee.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // In PR 71930, it was discovered that the code to retrieve the inferred type of a match scrutinee // was incorrect. diff --git a/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs b/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs index 058f4196798..96ff8ff36cd 100644 --- a/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs +++ b/tests/ui/pattern/usefulness/issue-72476-and-89393-associated-type.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/72476 // and https://github.com/rust-lang/rust/issues/89393 diff --git a/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs b/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs index 2879caf2c4c..4b05a2cad81 100644 --- a/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs +++ b/tests/ui/pattern/usefulness/issue-78549-ref-pat-and-str.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // From https://github.com/rust-lang/rust/issues/78549 fn main() { diff --git a/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs b/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs index aac7d7d5385..e963d65d6c7 100644 --- a/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs +++ b/tests/ui/pattern/usefulness/issue-80501-or-pat-and-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(unreachable_patterns)] pub enum TypeCtor { Slice, diff --git a/tests/ui/pattern/usefulness/issue-88747.rs b/tests/ui/pattern/usefulness/issue-88747.rs index 948c99f9ce9..9b04e766be8 100644 --- a/tests/ui/pattern/usefulness/issue-88747.rs +++ b/tests/ui/pattern/usefulness/issue-88747.rs @@ -1,4 +1,4 @@ -// check-pass: this used to be a stack overflow because of recursion in `usefulness.rs` +//@ check-pass: this used to be a stack overflow because of recursion in `usefulness.rs` macro_rules! long_tuple_arg { ([$($t:tt)*]#$($h:tt)*) => { diff --git a/tests/ui/pattern/usefulness/match-privately-empty.rs b/tests/ui/pattern/usefulness/match-privately-empty.rs index 67a9aa2e916..95b18e774fb 100644 --- a/tests/ui/pattern/usefulness/match-privately-empty.rs +++ b/tests/ui/pattern/usefulness/match-privately-empty.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![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/pattern/usefulness/nested-exhaustive-match.rs b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs index 8b2294f8432..51b05c9a111 100644 --- a/tests/ui/pattern/usefulness/nested-exhaustive-match.rs +++ b/tests/ui/pattern/usefulness/nested-exhaustive-match.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(dead_code)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 struct Foo { foo: bool, bar: Option<isize>, baz: isize } diff --git a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs index 3a8a74d1fd6..0c512e40432 100644 --- a/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs +++ b/tests/ui/pattern/usefulness/nested-non-exhaustive-enums.rs @@ -1,4 +1,4 @@ -// aux-build:non-exhaustive.rs +//@ aux-build:non-exhaustive.rs extern crate non_exhaustive; diff --git a/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs b/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs index cbf64e2c53d..63ae2c3d2fc 100644 --- a/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs +++ b/tests/ui/pattern/usefulness/slice-patterns-irrefutable.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let s: &[bool] = &[true; 0]; diff --git a/tests/ui/pattern/usefulness/slice_of_empty.rs b/tests/ui/pattern/usefulness/slice_of_empty.rs index 5f64dd3fecc..589c7767ad2 100644 --- a/tests/ui/pattern/usefulness/slice_of_empty.rs +++ b/tests/ui/pattern/usefulness/slice_of_empty.rs @@ -1,4 +1,4 @@ -// revisions: min_exhaustive_patterns exhaustive_patterns +//@ revisions: min_exhaustive_patterns exhaustive_patterns #![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/pattern/usefulness/stable-gated-fields.rs b/tests/ui/pattern/usefulness/stable-gated-fields.rs index 90f40a8d629..61b202b77f6 100644 --- a/tests/ui/pattern/usefulness/stable-gated-fields.rs +++ b/tests/ui/pattern/usefulness/stable-gated-fields.rs @@ -1,4 +1,4 @@ -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/stable-gated-patterns.rs b/tests/ui/pattern/usefulness/stable-gated-patterns.rs index 03db01160dd..5ceffbf0923 100644 --- a/tests/ui/pattern/usefulness/stable-gated-patterns.rs +++ b/tests/ui/pattern/usefulness/stable-gated-patterns.rs @@ -1,4 +1,4 @@ -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/uninhabited.rs b/tests/ui/pattern/usefulness/uninhabited.rs index 5622808d4c7..ff7aeb263e4 100644 --- a/tests/ui/pattern/usefulness/uninhabited.rs +++ b/tests/ui/pattern/usefulness/uninhabited.rs @@ -1,5 +1,5 @@ -// check-pass -// aux-build:empty.rs +//@ check-pass +//@ aux-build:empty.rs // // This tests plays with matching and uninhabited types. This also serves as a test for the // `Ty::is_inhabited_from` function. diff --git a/tests/ui/pattern/usefulness/unstable-gated-fields.rs b/tests/ui/pattern/usefulness/unstable-gated-fields.rs index 2b473ae989b..e6a4494867a 100644 --- a/tests/ui/pattern/usefulness/unstable-gated-fields.rs +++ b/tests/ui/pattern/usefulness/unstable-gated-fields.rs @@ -1,6 +1,6 @@ #![feature(unstable_test_feature)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; diff --git a/tests/ui/pattern/usefulness/unstable-gated-patterns.rs b/tests/ui/pattern/usefulness/unstable-gated-patterns.rs index 7046555e0d2..e6db495a149 100644 --- a/tests/ui/pattern/usefulness/unstable-gated-patterns.rs +++ b/tests/ui/pattern/usefulness/unstable-gated-patterns.rs @@ -1,6 +1,6 @@ #![feature(unstable_test_feature)] -// aux-build:unstable.rs +//@ aux-build:unstable.rs extern crate unstable; |
