From ec2cc761bc7067712ecc7734502f703fe3b024c8 Mon Sep 17 00:00:00 2001 From: "许杰友 Jieyou Xu (Joe)" Date: Fri, 16 Feb 2024 20:02:50 +0000 Subject: [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives --- tests/ui/parser/anon-enums-are-ambiguous.rs | 2 +- .../assoc/assoc-const-underscore-syntactic-pass.rs | 2 +- tests/ui/parser/assoc/assoc-oddities-1.rs | 2 +- tests/ui/parser/assoc/assoc-oddities-2.rs | 2 +- tests/ui/parser/async-with-nonterminal-block.rs | 4 ++-- tests/ui/parser/attribute/attr-dangling-in-fn.rs | 2 +- tests/ui/parser/attribute/attr-dangling-in-mod.rs | 2 +- tests/ui/parser/attribute/attr-unquoted-ident.fixed | 4 ++-- tests/ui/parser/attribute/attr-unquoted-ident.rs | 4 ++-- tests/ui/parser/bad-fn-ptr-qualifier.fixed | 4 ++-- tests/ui/parser/bad-fn-ptr-qualifier.rs | 4 ++-- tests/ui/parser/bad-name.rs | 2 +- tests/ui/parser/bad-recover-kw-after-impl.rs | 4 ++-- tests/ui/parser/bad-recover-ty-after-impl.rs | 2 +- tests/ui/parser/bastion-of-the-turbofish.rs | 2 +- tests/ui/parser/block-no-opening-brace.rs | 2 +- tests/ui/parser/bounds-obj-parens.rs | 2 +- tests/ui/parser/bounds-type.rs | 2 +- tests/ui/parser/break-in-unlabeled-block.fixed | 2 +- tests/ui/parser/break-in-unlabeled-block.rs | 2 +- tests/ui/parser/circular_modules_hello.rs | 2 +- tests/ui/parser/circular_modules_main.rs | 2 +- tests/ui/parser/class-implements-bad-trait.rs | 2 +- .../constraints-before-generic-args-syntactic-pass.rs | 2 +- tests/ui/parser/doc-comment-in-stmt.fixed | 2 +- tests/ui/parser/doc-comment-in-stmt.rs | 2 +- tests/ui/parser/eq-gt-to-gt-eq.fixed | 2 +- tests/ui/parser/eq-gt-to-gt-eq.rs | 2 +- tests/ui/parser/expr-as-stmt.fixed | 4 ++-- tests/ui/parser/expr-as-stmt.rs | 4 ++-- tests/ui/parser/extern-abi-from-mac-literal-frag.rs | 2 +- tests/ui/parser/extern-abi-raw-strings.rs | 2 +- tests/ui/parser/extern-abi-string-escaping.rs | 2 +- tests/ui/parser/extern-abi-syntactic.rs | 2 +- tests/ui/parser/extern-crate-async.rs | 2 +- tests/ui/parser/float-literals.rs | 2 +- tests/ui/parser/fn-body-optional-syntactic-pass.rs | 2 +- tests/ui/parser/fn-defined-using-def.rs | 2 +- tests/ui/parser/fn-defined-using-fun.rs | 2 +- tests/ui/parser/fn-defined-using-func.rs | 2 +- tests/ui/parser/fn-defined-using-function.rs | 2 +- tests/ui/parser/fn-header-semantic-fail.rs | 2 +- tests/ui/parser/fn-header-syntactic-pass.rs | 4 ++-- tests/ui/parser/fn-returns-fn-pointer.rs | 2 +- tests/ui/parser/foreign-static-syntactic-pass.rs | 2 +- tests/ui/parser/foreign-ty-syntactic-pass.rs | 2 +- tests/ui/parser/generic-param-default-in-binder.rs | 2 +- tests/ui/parser/if-block-unreachable-expr.rs | 2 +- tests/ui/parser/if-in-in.fixed | 2 +- tests/ui/parser/if-in-in.rs | 2 +- tests/ui/parser/impl-item-const-pass.rs | 2 +- tests/ui/parser/impl-item-fn-no-body-pass.rs | 2 +- tests/ui/parser/impl-item-type-no-body-pass.rs | 2 +- tests/ui/parser/impl-qpath.rs | 4 ++-- tests/ui/parser/import-from-path.rs | 2 +- tests/ui/parser/import-from-rename.rs | 2 +- tests/ui/parser/import-glob-path.rs | 2 +- tests/ui/parser/import-glob-rename.rs | 2 +- tests/ui/parser/increment-autofix-2.fixed | 2 +- tests/ui/parser/increment-autofix-2.rs | 2 +- tests/ui/parser/increment-autofix.fixed | 2 +- tests/ui/parser/increment-autofix.rs | 2 +- tests/ui/parser/inner-attr-in-trait-def.rs | 2 +- tests/ui/parser/intersection-patterns-1.fixed | 2 +- tests/ui/parser/intersection-patterns-1.rs | 2 +- .../issue-89971-outer-attr-following-inner-attr-ice.rs | 4 ++-- tests/ui/parser/issues/issue-100197-mut-let.fixed | 2 +- tests/ui/parser/issues/issue-100197-mut-let.rs | 2 +- tests/ui/parser/issues/issue-101477-enum.fixed | 2 +- tests/ui/parser/issues/issue-101477-enum.rs | 2 +- tests/ui/parser/issues/issue-101477-let.fixed | 2 +- tests/ui/parser/issues/issue-101477-let.rs | 2 +- tests/ui/parser/issues/issue-103381.fixed | 2 +- tests/ui/parser/issues/issue-103381.rs | 2 +- tests/ui/parser/issues/issue-103451.rs | 2 +- tests/ui/parser/issues/issue-10392-2.fixed | 2 +- tests/ui/parser/issues/issue-10392-2.rs | 2 +- tests/ui/parser/issues/issue-105209.rs | 2 +- tests/ui/parser/issues/issue-105366.fixed | 2 +- tests/ui/parser/issues/issue-105366.rs | 2 +- tests/ui/parser/issues/issue-105634.rs | 2 +- tests/ui/parser/issues/issue-10636-2.rs | 2 +- tests/ui/parser/issues/issue-107705.rs | 2 +- .../parser/issues/issue-108109-fn-missing-params.fixed | 2 +- .../ui/parser/issues/issue-108109-fn-missing-params.rs | 2 +- .../issues/issue-108109-fn-trait-missing-paren.fixed | 2 +- .../issues/issue-108109-fn-trait-missing-paren.rs | 2 +- tests/ui/parser/issues/issue-112188.fixed | 2 +- tests/ui/parser/issues/issue-112188.rs | 2 +- tests/ui/parser/issues/issue-113203.rs | 2 +- .../issues/issue-115780-pat-lt-bracket-in-macro-call.rs | 2 +- tests/ui/parser/issues/issue-14303-fncall.rs | 2 +- tests/ui/parser/issues/issue-17718-parse-const.rs | 2 +- tests/ui/parser/issues/issue-17904.rs | 2 +- tests/ui/parser/issues/issue-21146.rs | 2 +- tests/ui/parser/issues/issue-21475.rs | 4 ++-- tests/ui/parser/issues/issue-30318.fixed | 2 +- tests/ui/parser/issues/issue-30318.rs | 2 +- tests/ui/parser/issues/issue-3036.fixed | 2 +- tests/ui/parser/issues/issue-3036.rs | 2 +- .../ui/parser/issues/issue-35813-postfix-after-cast.rs | 2 +- tests/ui/parser/issues/issue-46186.fixed | 2 +- tests/ui/parser/issues/issue-46186.rs | 2 +- .../issue-48137-macros-cannot-interpolate-impl-items.rs | 2 +- tests/ui/parser/issues/issue-48508-aux.rs | 4 ++-- tests/ui/parser/issues/issue-48508.rs | 4 ++-- tests/ui/parser/issues/issue-48636.fixed | 2 +- tests/ui/parser/issues/issue-48636.rs | 2 +- tests/ui/parser/issues/issue-54521-1.rs | 2 +- tests/ui/parser/issues/issue-54521-2.fixed | 2 +- tests/ui/parser/issues/issue-54521-2.rs | 2 +- tests/ui/parser/issues/issue-54521-3.fixed | 2 +- tests/ui/parser/issues/issue-54521-3.rs | 2 +- tests/ui/parser/issues/issue-57684.fixed | 2 +- tests/ui/parser/issues/issue-57684.rs | 2 +- tests/ui/parser/issues/issue-57819.fixed | 2 +- tests/ui/parser/issues/issue-57819.rs | 2 +- tests/ui/parser/issues/issue-5806.rs | 4 ++-- .../issues/issue-58094-missing-right-square-bracket.rs | 4 ++-- tests/ui/parser/issues/issue-62524.rs | 2 +- tests/ui/parser/issues/issue-62554.rs | 2 +- tests/ui/parser/issues/issue-62894.rs | 2 +- tests/ui/parser/issues/issue-62973.rs | 2 +- .../parser/issues/issue-63115-range-pat-interpolated.rs | 2 +- tests/ui/parser/issues/issue-63116.rs | 2 +- tests/ui/parser/issues/issue-63135.rs | 4 ++-- .../issues/issue-65041-empty-vis-matcher-in-enum.rs | 2 +- .../issues/issue-65041-empty-vis-matcher-in-trait.rs | 2 +- .../issue-65846-rollback-gating-failing-matcher.rs | 2 +- tests/ui/parser/issues/issue-66473.rs | Bin 127 -> 129 bytes ...e-67146-negative-outlives-bound-syntactic-fail.fixed | 2 +- ...ssue-67146-negative-outlives-bound-syntactic-fail.rs | 2 +- tests/ui/parser/issues/issue-68629.rs | Bin 129 -> 131 bytes tests/ui/parser/issues/issue-68730.rs | Bin 175 -> 177 bytes .../issues/issue-68788-in-trait-item-propagation.rs | 4 ++-- .../issues/issue-70050-ntliteral-accepts-negated-lit.rs | 2 +- .../ui/parser/issues/issue-70388-without-witness.fixed | 2 +- tests/ui/parser/issues/issue-70388-without-witness.rs | 2 +- tests/ui/parser/issues/issue-7222.rs | 4 ++-- tests/ui/parser/issues/issue-75599.rs | 2 +- tests/ui/parser/issues/issue-76437-async.rs | 2 +- .../ui/parser/issues/issue-76437-const-async-unsafe.rs | 2 +- tests/ui/parser/issues/issue-76437-const-async.rs | 2 +- tests/ui/parser/issues/issue-76437-const.rs | 2 +- tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs | 2 +- tests/ui/parser/issues/issue-76437-unsafe.rs | 2 +- tests/ui/parser/issues/issue-76597.fixed | 2 +- tests/ui/parser/issues/issue-76597.rs | 2 +- tests/ui/parser/issues/issue-81804.rs | 4 ++-- tests/ui/parser/issues/issue-81827.rs | 4 ++-- tests/ui/parser/issues/issue-83639.rs | 2 +- tests/ui/parser/issues/issue-84104.rs | 2 +- tests/ui/parser/issues/issue-84148-2.rs | 2 +- .../parser/issues/issue-87197-missing-semicolon.fixed | 2 +- tests/ui/parser/issues/issue-87197-missing-semicolon.rs | 2 +- .../issue-87217-keyword-order/const-async-const.rs | 2 +- .../issues/issue-87217-keyword-order/several-kw-jump.rs | 2 +- .../issues/issue-87217-keyword-order/wrong-async.rs | 2 +- .../issues/issue-87217-keyword-order/wrong-const.rs | 2 +- .../issues/issue-87217-keyword-order/wrong-unsafe.rs | 2 +- tests/ui/parser/issues/issue-88276-unary-plus.fixed | 2 +- tests/ui/parser/issues/issue-88276-unary-plus.rs | 2 +- tests/ui/parser/issues/issue-88583-union-as-ident.rs | 2 +- tests/ui/parser/issues/issue-88770.rs | 2 +- tests/ui/parser/issues/issue-89396.fixed | 2 +- tests/ui/parser/issues/issue-89396.rs | 2 +- .../issue-89971-outer-attr-following-inner-attr-ice.rs | 2 +- .../issue-99625-enum-struct-mutually-exclusive.fixed | 2 +- .../issue-99625-enum-struct-mutually-exclusive.rs | 2 +- .../issue-99910-const-let-mutually-exclusive.fixed | 2 +- .../issues/issue-99910-const-let-mutually-exclusive.rs | 2 +- tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed | 2 +- tests/ui/parser/issues/recover-ge-as-fat-arrow.rs | 2 +- .../ui/parser/item-free-const-no-body-syntactic-pass.rs | 2 +- .../parser/item-free-static-no-body-syntactic-pass.rs | 2 +- tests/ui/parser/item-free-type-bounds-syntactic-pass.rs | 2 +- tests/ui/parser/item-kw-case-mismatch.fixed | 4 ++-- tests/ui/parser/item-kw-case-mismatch.rs | 4 ++-- .../ui/parser/keyword-try-as-identifier-edition2018.rs | 2 +- tests/ui/parser/keyword-union-as-identifier.rs | 2 +- tests/ui/parser/kw-in-trait-bounds.rs | 2 +- tests/ui/parser/let-binop.fixed | 2 +- tests/ui/parser/let-binop.rs | 2 +- tests/ui/parser/lifetime-semicolon.fixed | 2 +- tests/ui/parser/lifetime-semicolon.rs | 2 +- tests/ui/parser/macro-braces-dot-question.rs | 2 +- tests/ui/parser/macro/macro-expand-to-field.rs | 2 +- .../macro/mbe-bare-trait-object-maybe-trait-bound.rs | 4 ++-- tests/ui/parser/match-refactor-to-expr.fixed | 2 +- tests/ui/parser/match-refactor-to-expr.rs | 2 +- tests/ui/parser/mbe_missing_right_paren.rs | 2 +- tests/ui/parser/missing_right_paren.rs | 4 ++-- tests/ui/parser/misspelled-macro-rules.fixed | 2 +- tests/ui/parser/misspelled-macro-rules.rs | 2 +- tests/ui/parser/mod_file_not_exist.rs | 2 +- tests/ui/parser/mod_file_not_exist_windows.rs | 2 +- tests/ui/parser/mod_file_with_path_attr.rs | 2 +- tests/ui/parser/mut-patterns.rs | 2 +- tests/ui/parser/operator-associativity.rs | 2 +- tests/ui/parser/parse-assoc-type-lt.rs | 4 ++-- tests/ui/parser/parse-panic.rs | 2 +- tests/ui/parser/parser-unicode-whitespace.rs | 2 +- tests/ui/parser/pat-tuple-2.rs | 2 +- tests/ui/parser/public-instead-of-pub-1.fixed | 2 +- tests/ui/parser/public-instead-of-pub-1.rs | 2 +- tests/ui/parser/public-instead-of-pub-3.fixed | 2 +- tests/ui/parser/public-instead-of-pub-3.rs | 2 +- tests/ui/parser/public-instead-of-pub.fixed | 4 ++-- tests/ui/parser/public-instead-of-pub.rs | 4 ++-- tests/ui/parser/qualified-path-in-turbofish.fixed | 2 +- tests/ui/parser/qualified-path-in-turbofish.rs | 2 +- tests/ui/parser/range_inclusive.fixed | 2 +- tests/ui/parser/range_inclusive.rs | 2 +- tests/ui/parser/ranges-precedence.rs | 2 +- tests/ui/parser/raw/raw-str-in-macro-call.rs | 2 +- tests/ui/parser/recover/recover-const-async-fn-ptr.rs | 2 +- .../recover/recover-for-loop-parens-around-head.fixed | 2 +- .../recover/recover-for-loop-parens-around-head.rs | 2 +- .../parser/recover/recover-labeled-non-block-expr.fixed | 2 +- .../ui/parser/recover/recover-labeled-non-block-expr.rs | 2 +- .../recover/recover-missing-semi-before-item.fixed | 2 +- .../parser/recover/recover-missing-semi-before-item.rs | 2 +- .../recover/recover-parens-around-match-arm-head.fixed | 2 +- .../recover/recover-parens-around-match-arm-head.rs | 2 +- tests/ui/parser/recover/recover-unticked-labels.fixed | 2 +- tests/ui/parser/recover/recover-unticked-labels.rs | 2 +- ...ecover-where-clause-before-tuple-struct-body-0.fixed | 2 +- .../recover-where-clause-before-tuple-struct-body-0.rs | 2 +- tests/ui/parser/removed-syntax/removed-syntax-box.fixed | 2 +- tests/ui/parser/removed-syntax/removed-syntax-box.rs | 2 +- tests/ui/parser/self-param-syntactic-pass.rs | 2 +- tests/ui/parser/semi-after-closure-in-macro.rs | 2 +- tests/ui/parser/shebang/multiline-attrib.rs | 2 +- tests/ui/parser/shebang/regular-attrib.rs | 2 +- tests/ui/parser/shebang/shebang-and-attrib.rs | 2 +- tests/ui/parser/shebang/shebang-comment.rs | 2 +- tests/ui/parser/shebang/shebang-empty.rs | 2 +- tests/ui/parser/shebang/shebang-space.rs | 2 +- tests/ui/parser/shebang/sneaky-attrib.rs | 2 +- tests/ui/parser/shebang/valid-shebang.rs | 2 +- tests/ui/parser/slowparse-bstring.rs | 2 +- tests/ui/parser/slowparse-string.rs | 2 +- tests/ui/parser/stripped-nested-outline-mod-pass.rs | 2 +- ...uct-default-values-and-missing-field-separator.fixed | 2 +- ...struct-default-values-and-missing-field-separator.rs | 2 +- tests/ui/parser/struct-filed-with-attr.fixed | 2 +- tests/ui/parser/struct-filed-with-attr.rs | 2 +- tests/ui/parser/struct-literal-in-match-guard.rs | 2 +- tests/ui/parser/suggest-assoc-const.fixed | 2 +- tests/ui/parser/suggest-assoc-const.rs | 2 +- ...gest-removing-semicolon-after-impl-trait-items.fixed | 2 +- ...suggest-removing-semicolon-after-impl-trait-items.rs | 2 +- tests/ui/parser/suggest-semicolon-before-array.fixed | 2 +- tests/ui/parser/suggest-semicolon-before-array.rs | 2 +- tests/ui/parser/suggest_misplaced_generics/enum.fixed | 2 +- tests/ui/parser/suggest_misplaced_generics/enum.rs | 2 +- .../fn-complex-generics.fixed | 2 +- .../suggest_misplaced_generics/fn-complex-generics.rs | 2 +- .../parser/suggest_misplaced_generics/fn-simple.fixed | 2 +- tests/ui/parser/suggest_misplaced_generics/fn-simple.rs | 2 +- tests/ui/parser/suggest_misplaced_generics/struct.fixed | 2 +- tests/ui/parser/suggest_misplaced_generics/struct.rs | 2 +- tests/ui/parser/suggest_misplaced_generics/trait.fixed | 2 +- tests/ui/parser/suggest_misplaced_generics/trait.rs | 2 +- tests/ui/parser/suggest_misplaced_generics/type.fixed | 2 +- tests/ui/parser/suggest_misplaced_generics/type.rs | 2 +- tests/ui/parser/trailing-plus-in-bounds.rs | 2 +- tests/ui/parser/trailing-question-in-type.fixed | 2 +- tests/ui/parser/trailing-question-in-type.rs | 2 +- tests/ui/parser/trait-item-with-defaultness-pass.rs | 2 +- tests/ui/parser/trait-object-delimiters.rs | 2 +- tests/ui/parser/trait-plusequal-splitting.rs | 2 +- tests/ui/parser/try-with-nonterminal-block.rs | 4 ++-- tests/ui/parser/unbalanced-doublequote.rs | 2 +- tests/ui/parser/unicode-character-literal.fixed | 2 +- tests/ui/parser/unicode-character-literal.rs | 2 +- tests/ui/parser/use-unclosed-brace.rs | 2 +- tests/ui/parser/utf16-be-without-bom.rs | Bin 125 -> 127 bytes tests/ui/parser/utf16-le-without-bom.rs | Bin 126 -> 128 bytes tests/ui/parser/utf8_idents-rpass.rs | 2 +- tests/ui/parser/variadic-ffi-syntactic-pass.rs | 2 +- 281 files changed, 305 insertions(+), 305 deletions(-) (limited to 'tests/ui/parser') diff --git a/tests/ui/parser/anon-enums-are-ambiguous.rs b/tests/ui/parser/anon-enums-are-ambiguous.rs index b0173cf98e0..c6c3a6be1ef 100644 --- a/tests/ui/parser/anon-enums-are-ambiguous.rs +++ b/tests/ui/parser/anon-enums-are-ambiguous.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! test_expr { ($expr:expr) => {}; diff --git a/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs b/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs index 60da408c811..6c045379191 100644 --- a/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs +++ b/tests/ui/parser/assoc/assoc-const-underscore-syntactic-pass.rs @@ -1,6 +1,6 @@ // All constant items (associated or otherwise) may syntactically use `_` as a name. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/assoc/assoc-oddities-1.rs b/tests/ui/parser/assoc/assoc-oddities-1.rs index 5914805e5c1..246546ac034 100644 --- a/tests/ui/parser/assoc/assoc-oddities-1.rs +++ b/tests/ui/parser/assoc/assoc-oddities-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn main() { // following lines below parse and must not fail diff --git a/tests/ui/parser/assoc/assoc-oddities-2.rs b/tests/ui/parser/assoc/assoc-oddities-2.rs index 3d35aad7455..aee2af41d62 100644 --- a/tests/ui/parser/assoc/assoc-oddities-2.rs +++ b/tests/ui/parser/assoc/assoc-oddities-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only fn main() { // see assoc-oddities-1 for explanation diff --git a/tests/ui/parser/async-with-nonterminal-block.rs b/tests/ui/parser/async-with-nonterminal-block.rs index 96015fd5d82..8604bd383a1 100644 --- a/tests/ui/parser/async-with-nonterminal-block.rs +++ b/tests/ui/parser/async-with-nonterminal-block.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 macro_rules! create_async { ($body:block) => { diff --git a/tests/ui/parser/attribute/attr-dangling-in-fn.rs b/tests/ui/parser/attribute/attr-dangling-in-fn.rs index c7c45bafb0d..d59f90aed5d 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-fn.rs +++ b/tests/ui/parser/attribute/attr-dangling-in-fn.rs @@ -1,4 +1,4 @@ -// error-pattern:expected statement +//@ error-pattern:expected statement fn f() { #[foo = "bar"] diff --git a/tests/ui/parser/attribute/attr-dangling-in-mod.rs b/tests/ui/parser/attribute/attr-dangling-in-mod.rs index 261ed3913af..001ac1135f6 100644 --- a/tests/ui/parser/attribute/attr-dangling-in-mod.rs +++ b/tests/ui/parser/attribute/attr-dangling-in-mod.rs @@ -1,4 +1,4 @@ -// error-pattern:expected item +//@ error-pattern:expected item fn main() { } diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.fixed b/tests/ui/parser/attribute/attr-unquoted-ident.fixed index 6cdf22f7ec0..636508b5615 100644 --- a/tests/ui/parser/attribute/attr-unquoted-ident.fixed +++ b/tests/ui/parser/attribute/attr-unquoted-ident.fixed @@ -1,5 +1,5 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes -// run-rustfix +//@ compile-flags: -Zdeduplicate-diagnostics=yes +//@ run-rustfix fn main() { #[cfg(key="foo")] diff --git a/tests/ui/parser/attribute/attr-unquoted-ident.rs b/tests/ui/parser/attribute/attr-unquoted-ident.rs index 75af015c9fe..9b9a9f78403 100644 --- a/tests/ui/parser/attribute/attr-unquoted-ident.rs +++ b/tests/ui/parser/attribute/attr-unquoted-ident.rs @@ -1,5 +1,5 @@ -// compile-flags: -Zdeduplicate-diagnostics=yes -// run-rustfix +//@ compile-flags: -Zdeduplicate-diagnostics=yes +//@ run-rustfix fn main() { #[cfg(key=foo)] diff --git a/tests/ui/parser/bad-fn-ptr-qualifier.fixed b/tests/ui/parser/bad-fn-ptr-qualifier.fixed index ad8e718cf88..558a27cd456 100644 --- a/tests/ui/parser/bad-fn-ptr-qualifier.fixed +++ b/tests/ui/parser/bad-fn-ptr-qualifier.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Most of items are taken from ./recover-const-async-fn-ptr.rs but this is able to apply rustfix. pub type T0 = fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/bad-fn-ptr-qualifier.rs b/tests/ui/parser/bad-fn-ptr-qualifier.rs index c04813dadff..9750f480935 100644 --- a/tests/ui/parser/bad-fn-ptr-qualifier.rs +++ b/tests/ui/parser/bad-fn-ptr-qualifier.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 // Most of items are taken from ./recover-const-async-fn-ptr.rs but this is able to apply rustfix. pub type T0 = const fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/bad-name.rs b/tests/ui/parser/bad-name.rs index 9b42716924d..59432a1d9a5 100644 --- a/tests/ui/parser/bad-name.rs +++ b/tests/ui/parser/bad-name.rs @@ -1,4 +1,4 @@ -// error-pattern: expected +//@ error-pattern: expected fn main() { let x.y::.z foo; diff --git a/tests/ui/parser/bad-recover-kw-after-impl.rs b/tests/ui/parser/bad-recover-kw-after-impl.rs index 218cd767859..23abceaf493 100644 --- a/tests/ui/parser/bad-recover-kw-after-impl.rs +++ b/tests/ui/parser/bad-recover-kw-after-impl.rs @@ -1,6 +1,6 @@ -// check-pass +//@ check-pass -// edition:2021 +//@ edition:2021 // for the `impl` + keyword test macro_rules! impl_primitive { diff --git a/tests/ui/parser/bad-recover-ty-after-impl.rs b/tests/ui/parser/bad-recover-ty-after-impl.rs index 510e08ba091..7ea0049f8f8 100644 --- a/tests/ui/parser/bad-recover-ty-after-impl.rs +++ b/tests/ui/parser/bad-recover-ty-after-impl.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! impl_primitive { ($ty:ty) => { impl_primitive!(impl $ty); }; diff --git a/tests/ui/parser/bastion-of-the-turbofish.rs b/tests/ui/parser/bastion-of-the-turbofish.rs index 7ceea676d3a..45d4d82344b 100644 --- a/tests/ui/parser/bastion-of-the-turbofish.rs +++ b/tests/ui/parser/bastion-of-the-turbofish.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Bastion of the Turbofish // ------------------------ diff --git a/tests/ui/parser/block-no-opening-brace.rs b/tests/ui/parser/block-no-opening-brace.rs index 8a6599488b1..e90a34104e8 100644 --- a/tests/ui/parser/block-no-opening-brace.rs +++ b/tests/ui/parser/block-no-opening-brace.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![feature(try_blocks)] diff --git a/tests/ui/parser/bounds-obj-parens.rs b/tests/ui/parser/bounds-obj-parens.rs index 8c446d27d0a..eea4bccdc09 100644 --- a/tests/ui/parser/bounds-obj-parens.rs +++ b/tests/ui/parser/bounds-obj-parens.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/parser/bounds-type.rs b/tests/ui/parser/bounds-type.rs index bd5f6105f51..a1971fa3146 100644 --- a/tests/ui/parser/bounds-type.rs +++ b/tests/ui/parser/bounds-type.rs @@ -1,4 +1,4 @@ -// compile-flags: -Z parse-only +//@ compile-flags: -Z parse-only struct S< T: 'a + Tr, // OK diff --git a/tests/ui/parser/break-in-unlabeled-block.fixed b/tests/ui/parser/break-in-unlabeled-block.fixed index 08856232521..9aeaa2de93f 100644 --- a/tests/ui/parser/break-in-unlabeled-block.fixed +++ b/tests/ui/parser/break-in-unlabeled-block.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'block: { break 'block (); //~ ERROR `break` outside of a loop or labeled block diff --git a/tests/ui/parser/break-in-unlabeled-block.rs b/tests/ui/parser/break-in-unlabeled-block.rs index 3e5587e9f9c..1c952f4b5f4 100644 --- a/tests/ui/parser/break-in-unlabeled-block.rs +++ b/tests/ui/parser/break-in-unlabeled-block.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { { break (); //~ ERROR `break` outside of a loop or labeled block diff --git a/tests/ui/parser/circular_modules_hello.rs b/tests/ui/parser/circular_modules_hello.rs index 6968ca97b82..eb0284d8b41 100644 --- a/tests/ui/parser/circular_modules_hello.rs +++ b/tests/ui/parser/circular_modules_hello.rs @@ -1,4 +1,4 @@ -// ignore-test: this is an auxiliary file for circular-modules-main.rs +//@ ignore-test: this is an auxiliary file for circular-modules-main.rs #[path = "circular_modules_main.rs"] mod circular_modules_main; diff --git a/tests/ui/parser/circular_modules_main.rs b/tests/ui/parser/circular_modules_main.rs index d4b47efe681..d5cdff34a26 100644 --- a/tests/ui/parser/circular_modules_main.rs +++ b/tests/ui/parser/circular_modules_main.rs @@ -1,4 +1,4 @@ -// error-pattern: circular modules +//@ error-pattern: circular modules #[path = "circular_modules_hello.rs"] mod circular_modules_hello; diff --git a/tests/ui/parser/class-implements-bad-trait.rs b/tests/ui/parser/class-implements-bad-trait.rs index f2f85d0265a..152fe09b51c 100644 --- a/tests/ui/parser/class-implements-bad-trait.rs +++ b/tests/ui/parser/class-implements-bad-trait.rs @@ -1,4 +1,4 @@ -// error-pattern:nonexistent +//@ error-pattern:nonexistent class cat : nonexistent { let meows: usize; new(in_x : usize) { self.meows = in_x; } diff --git a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs index d8346653c25..6566d8a1115 100644 --- a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs +++ b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #[cfg(FALSE)] fn syntax() { diff --git a/tests/ui/parser/doc-comment-in-stmt.fixed b/tests/ui/parser/doc-comment-in-stmt.fixed index 4b3ecccf66c..7deaee3d9d8 100644 --- a/tests/ui/parser/doc-comment-in-stmt.fixed +++ b/tests/ui/parser/doc-comment-in-stmt.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() -> bool { false diff --git a/tests/ui/parser/doc-comment-in-stmt.rs b/tests/ui/parser/doc-comment-in-stmt.rs index 73d08f51c66..5a0ee263871 100644 --- a/tests/ui/parser/doc-comment-in-stmt.rs +++ b/tests/ui/parser/doc-comment-in-stmt.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() -> bool { false diff --git a/tests/ui/parser/eq-gt-to-gt-eq.fixed b/tests/ui/parser/eq-gt-to-gt-eq.fixed index 44cb464fc0c..abb328399be 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.fixed +++ b/tests/ui/parser/eq-gt-to-gt-eq.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. #![allow(unused)] diff --git a/tests/ui/parser/eq-gt-to-gt-eq.rs b/tests/ui/parser/eq-gt-to-gt-eq.rs index dca67c89cc0..1f57fa83281 100644 --- a/tests/ui/parser/eq-gt-to-gt-eq.rs +++ b/tests/ui/parser/eq-gt-to-gt-eq.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Check that we try to correct `=>` to `>=` in conditions. #![allow(unused)] diff --git a/tests/ui/parser/expr-as-stmt.fixed b/tests/ui/parser/expr-as-stmt.fixed index b06f62794c4..0a4d62a4a0c 100644 --- a/tests/ui/parser/expr-as-stmt.fixed +++ b/tests/ui/parser/expr-as-stmt.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// rustfix-only-machine-applicable +//@ run-rustfix +//@ rustfix-only-machine-applicable #![allow(unused_variables)] #![allow(dead_code)] #![allow(unused_must_use)] diff --git a/tests/ui/parser/expr-as-stmt.rs b/tests/ui/parser/expr-as-stmt.rs index b39d2b88647..99c85e65baa 100644 --- a/tests/ui/parser/expr-as-stmt.rs +++ b/tests/ui/parser/expr-as-stmt.rs @@ -1,5 +1,5 @@ -// run-rustfix -// rustfix-only-machine-applicable +//@ run-rustfix +//@ rustfix-only-machine-applicable #![allow(unused_variables)] #![allow(dead_code)] #![allow(unused_must_use)] diff --git a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs index 8f5d7f4f7f8..a4e9134218c 100644 --- a/tests/ui/parser/extern-abi-from-mac-literal-frag.rs +++ b/tests/ui/parser/extern-abi-from-mac-literal-frag.rs @@ -1,5 +1,5 @@ #![allow(clashing_extern_declarations)] -// check-pass +//@ check-pass // In this test we check that the parser accepts an ABI string when it // comes from a macro `literal` or `expr` fragment as opposed to a hardcoded string. diff --git a/tests/ui/parser/extern-abi-raw-strings.rs b/tests/ui/parser/extern-abi-raw-strings.rs index fad855a21f6..cad7943ed62 100644 --- a/tests/ui/parser/extern-abi-raw-strings.rs +++ b/tests/ui/parser/extern-abi-raw-strings.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that the string literal in `extern lit` will accept raw strings. diff --git a/tests/ui/parser/extern-abi-string-escaping.rs b/tests/ui/parser/extern-abi-string-escaping.rs index 87bd31aabb6..f7bc71e34db 100644 --- a/tests/ui/parser/extern-abi-string-escaping.rs +++ b/tests/ui/parser/extern-abi-string-escaping.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that the string literal in `extern lit` will escapes. diff --git a/tests/ui/parser/extern-abi-syntactic.rs b/tests/ui/parser/extern-abi-syntactic.rs index 7d2bbfe8a01..d3e2ba0e2d3 100644 --- a/tests/ui/parser/extern-abi-syntactic.rs +++ b/tests/ui/parser/extern-abi-syntactic.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Check that from the grammar's point of view, // the specific set of ABIs is not part of it. diff --git a/tests/ui/parser/extern-crate-async.rs b/tests/ui/parser/extern-crate-async.rs index 6a54ac7f4a5..7c7769075b6 100644 --- a/tests/ui/parser/extern-crate-async.rs +++ b/tests/ui/parser/extern-crate-async.rs @@ -1,7 +1,7 @@ // Make sure that we don't parse `extern crate async` // the front matter of a function leading us astray. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/float-literals.rs b/tests/ui/parser/float-literals.rs index 1e9319fd27d..d8ee59bca82 100644 --- a/tests/ui/parser/float-literals.rs +++ b/tests/ui/parser/float-literals.rs @@ -1,4 +1,4 @@ -// build-pass +//@ build-pass // ignore-tidy-linelength // Regression test for #31109 and #31407. diff --git a/tests/ui/parser/fn-body-optional-syntactic-pass.rs b/tests/ui/parser/fn-body-optional-syntactic-pass.rs index f9dbebf0bea..140471dfc77 100644 --- a/tests/ui/parser/fn-body-optional-syntactic-pass.rs +++ b/tests/ui/parser/fn-body-optional-syntactic-pass.rs @@ -1,6 +1,6 @@ // Ensures that all `fn` forms having or lacking a body are syntactically valid. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/fn-defined-using-def.rs b/tests/ui/parser/fn-defined-using-def.rs index 21da34c47c9..7a040d5de72 100644 --- a/tests/ui/parser/fn-defined-using-def.rs +++ b/tests/ui/parser/fn-defined-using-def.rs @@ -1,5 +1,5 @@ // Check what happens when `def` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-fun.rs b/tests/ui/parser/fn-defined-using-fun.rs index 4f74605043e..b90452e3c6b 100644 --- a/tests/ui/parser/fn-defined-using-fun.rs +++ b/tests/ui/parser/fn-defined-using-fun.rs @@ -1,5 +1,5 @@ // Check what happens when `fun` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-func.rs b/tests/ui/parser/fn-defined-using-func.rs index 2dce96fdce0..a7b66c28541 100644 --- a/tests/ui/parser/fn-defined-using-func.rs +++ b/tests/ui/parser/fn-defined-using-func.rs @@ -1,5 +1,5 @@ // Check what happens when `func` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-defined-using-function.rs b/tests/ui/parser/fn-defined-using-function.rs index fd8782728e2..6ea12514c47 100644 --- a/tests/ui/parser/fn-defined-using-function.rs +++ b/tests/ui/parser/fn-defined-using-function.rs @@ -1,5 +1,5 @@ // Check what happens when `function` is used to define a function, instead of `fn` -// edition:2021 +//@ edition:2021 #![allow(dead_code)] diff --git a/tests/ui/parser/fn-header-semantic-fail.rs b/tests/ui/parser/fn-header-semantic-fail.rs index f01e1c2277c..25d7c3f35fc 100644 --- a/tests/ui/parser/fn-header-semantic-fail.rs +++ b/tests/ui/parser/fn-header-semantic-fail.rs @@ -1,6 +1,6 @@ // Ensures that all `fn` forms can have all the function qualifiers syntactically. -// edition:2018 +//@ edition:2018 #![feature(const_extern_fn)] diff --git a/tests/ui/parser/fn-header-syntactic-pass.rs b/tests/ui/parser/fn-header-syntactic-pass.rs index 68f1f7901bb..065ded31b07 100644 --- a/tests/ui/parser/fn-header-syntactic-pass.rs +++ b/tests/ui/parser/fn-header-syntactic-pass.rs @@ -1,7 +1,7 @@ // Ensures that all `fn` forms can have all the function qualifiers syntactically. -// check-pass -// edition:2018 +//@ check-pass +//@ edition:2018 fn main() {} diff --git a/tests/ui/parser/fn-returns-fn-pointer.rs b/tests/ui/parser/fn-returns-fn-pointer.rs index 15590e32486..e19108bb2ca 100644 --- a/tests/ui/parser/fn-returns-fn-pointer.rs +++ b/tests/ui/parser/fn-returns-fn-pointer.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Regression test for #78507. fn foo() -> Option Option> { Some(|| Some(true)) diff --git a/tests/ui/parser/foreign-static-syntactic-pass.rs b/tests/ui/parser/foreign-static-syntactic-pass.rs index 59949634617..a76b9bab491 100644 --- a/tests/ui/parser/foreign-static-syntactic-pass.rs +++ b/tests/ui/parser/foreign-static-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a foreign static may have a body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/foreign-ty-syntactic-pass.rs b/tests/ui/parser/foreign-ty-syntactic-pass.rs index a746de1f14f..50bb68cd83b 100644 --- a/tests/ui/parser/foreign-ty-syntactic-pass.rs +++ b/tests/ui/parser/foreign-ty-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/generic-param-default-in-binder.rs b/tests/ui/parser/generic-param-default-in-binder.rs index 78dc4186b3a..740640f43a4 100644 --- a/tests/ui/parser/generic-param-default-in-binder.rs +++ b/tests/ui/parser/generic-param-default-in-binder.rs @@ -1,7 +1,7 @@ // Check that defaults for generic parameters in `for<...>` binders are // syntactically valid. See also PR #119042. -// check-pass +//@ check-pass macro_rules! a { ($ty:ty) => {} } diff --git a/tests/ui/parser/if-block-unreachable-expr.rs b/tests/ui/parser/if-block-unreachable-expr.rs index 4063a337084..01d8f62ddfb 100644 --- a/tests/ui/parser/if-block-unreachable-expr.rs +++ b/tests/ui/parser/if-block-unreachable-expr.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This regressed from 1.20 -> 1.21 -- the condition is unreachable, // but it's still an expression, and should parse fine. diff --git a/tests/ui/parser/if-in-in.fixed b/tests/ui/parser/if-in-in.fixed index 0bb88c55936..566efbdf9f0 100644 --- a/tests/ui/parser/if-in-in.fixed +++ b/tests/ui/parser/if-in-in.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for i in 1..2 { //~ ERROR expected iterable, found keyword `in` diff --git a/tests/ui/parser/if-in-in.rs b/tests/ui/parser/if-in-in.rs index 6c0986fe1ba..048bc03b91a 100644 --- a/tests/ui/parser/if-in-in.rs +++ b/tests/ui/parser/if-in-in.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { for i in in 1..2 { //~ ERROR expected iterable, found keyword `in` diff --git a/tests/ui/parser/impl-item-const-pass.rs b/tests/ui/parser/impl-item-const-pass.rs index d1124561374..8ebdf633b5b 100644 --- a/tests/ui/parser/impl-item-const-pass.rs +++ b/tests/ui/parser/impl-item-const-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-item-fn-no-body-pass.rs b/tests/ui/parser/impl-item-fn-no-body-pass.rs index 16b09d64e8c..5a593fe1d12 100644 --- a/tests/ui/parser/impl-item-fn-no-body-pass.rs +++ b/tests/ui/parser/impl-item-fn-no-body-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-item-type-no-body-pass.rs b/tests/ui/parser/impl-item-type-no-body-pass.rs index 74a9c6ab7e8..039825bcc53 100644 --- a/tests/ui/parser/impl-item-type-no-body-pass.rs +++ b/tests/ui/parser/impl-item-type-no-body-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/impl-qpath.rs b/tests/ui/parser/impl-qpath.rs index d1f0a02041b..d7c4989b6e4 100644 --- a/tests/ui/parser/impl-qpath.rs +++ b/tests/ui/parser/impl-qpath.rs @@ -1,5 +1,5 @@ -// check-pass -// compile-flags: -Z parse-only +//@ check-pass +//@ compile-flags: -Z parse-only impl <*const u8>::AssocTy {} // OK impl ::AssocTy {} // OK diff --git a/tests/ui/parser/import-from-path.rs b/tests/ui/parser/import-from-path.rs index 3fce08259fc..54349d4971e 100644 --- a/tests/ui/parser/import-from-path.rs +++ b/tests/ui/parser/import-from-path.rs @@ -1,2 +1,2 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::{bar}::baz diff --git a/tests/ui/parser/import-from-rename.rs b/tests/ui/parser/import-from-rename.rs index 27425a3c99a..f6a4bb55553 100644 --- a/tests/ui/parser/import-from-rename.rs +++ b/tests/ui/parser/import-from-rename.rs @@ -1,4 +1,4 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::{bar} as baz; diff --git a/tests/ui/parser/import-glob-path.rs b/tests/ui/parser/import-glob-path.rs index de4c07aa7bb..cb854de0cff 100644 --- a/tests/ui/parser/import-glob-path.rs +++ b/tests/ui/parser/import-glob-path.rs @@ -1,2 +1,2 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::*::bar diff --git a/tests/ui/parser/import-glob-rename.rs b/tests/ui/parser/import-glob-rename.rs index b9b753dcd70..899818b15b6 100644 --- a/tests/ui/parser/import-glob-rename.rs +++ b/tests/ui/parser/import-glob-rename.rs @@ -1,4 +1,4 @@ -// error-pattern:expected +//@ error-pattern:expected use foo::* as baz; diff --git a/tests/ui/parser/increment-autofix-2.fixed b/tests/ui/parser/increment-autofix-2.fixed index 580ebaf5dbb..7d40add9a30 100644 --- a/tests/ui/parser/increment-autofix-2.fixed +++ b/tests/ui/parser/increment-autofix-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { bar: Bar, diff --git a/tests/ui/parser/increment-autofix-2.rs b/tests/ui/parser/increment-autofix-2.rs index ebe5fa6ca1e..27cd8fb0b1c 100644 --- a/tests/ui/parser/increment-autofix-2.rs +++ b/tests/ui/parser/increment-autofix-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo { bar: Bar, diff --git a/tests/ui/parser/increment-autofix.fixed b/tests/ui/parser/increment-autofix.fixed index 7a426badfc2..1d2800574d8 100644 --- a/tests/ui/parser/increment-autofix.fixed +++ b/tests/ui/parser/increment-autofix.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn pre_regular() { let mut i = 0; diff --git a/tests/ui/parser/increment-autofix.rs b/tests/ui/parser/increment-autofix.rs index d38603697a7..4b36e2c546a 100644 --- a/tests/ui/parser/increment-autofix.rs +++ b/tests/ui/parser/increment-autofix.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn pre_regular() { let mut i = 0; diff --git a/tests/ui/parser/inner-attr-in-trait-def.rs b/tests/ui/parser/inner-attr-in-trait-def.rs index 8dba6b362cd..0c6f710b1cf 100644 --- a/tests/ui/parser/inner-attr-in-trait-def.rs +++ b/tests/ui/parser/inner-attr-in-trait-def.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![deny(non_camel_case_types)] diff --git a/tests/ui/parser/intersection-patterns-1.fixed b/tests/ui/parser/intersection-patterns-1.fixed index 44773095b87..f63d57472cf 100644 --- a/tests/ui/parser/intersection-patterns-1.fixed +++ b/tests/ui/parser/intersection-patterns-1.fixed @@ -6,7 +6,7 @@ // to suggest either switching the order or note that intersection // patterns are not allowed. -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] diff --git a/tests/ui/parser/intersection-patterns-1.rs b/tests/ui/parser/intersection-patterns-1.rs index 1036b9daf64..3a457659aac 100644 --- a/tests/ui/parser/intersection-patterns-1.rs +++ b/tests/ui/parser/intersection-patterns-1.rs @@ -6,7 +6,7 @@ // to suggest either switching the order or note that intersection // patterns are not allowed. -// run-rustfix +//@ run-rustfix #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs index e5604b816b5..44697afcfed 100644 --- a/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs +++ b/tests/ui/parser/issues/auxiliary/issue-89971-outer-attr-following-inner-attr-ice.rs @@ -1,5 +1,5 @@ -// force-host -// no-prefer-dynamic +//@ force-host +//@ no-prefer-dynamic #![crate_type = "proc-macro"] diff --git a/tests/ui/parser/issues/issue-100197-mut-let.fixed b/tests/ui/parser/issues/issue-100197-mut-let.fixed index 5a895622200..a7af3cb1500 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.fixed +++ b/tests/ui/parser/issues/issue-100197-mut-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let mut _x = 123; diff --git a/tests/ui/parser/issues/issue-100197-mut-let.rs b/tests/ui/parser/issues/issue-100197-mut-let.rs index 71103813a6e..38ed287d14d 100644 --- a/tests/ui/parser/issues/issue-100197-mut-let.rs +++ b/tests/ui/parser/issues/issue-100197-mut-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { mut let _x = 123; diff --git a/tests/ui/parser/issues/issue-101477-enum.fixed b/tests/ui/parser/issues/issue-101477-enum.fixed index 1dfeae22aea..92c2b7c470f 100644 --- a/tests/ui/parser/issues/issue-101477-enum.fixed +++ b/tests/ui/parser/issues/issue-101477-enum.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] enum Demo { diff --git a/tests/ui/parser/issues/issue-101477-enum.rs b/tests/ui/parser/issues/issue-101477-enum.rs index ea7051d69a4..21d377384d3 100644 --- a/tests/ui/parser/issues/issue-101477-enum.rs +++ b/tests/ui/parser/issues/issue-101477-enum.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(dead_code)] enum Demo { diff --git a/tests/ui/parser/issues/issue-101477-let.fixed b/tests/ui/parser/issues/issue-101477-let.fixed index 9989ad81524..cbcbeb171af 100644 --- a/tests/ui/parser/issues/issue-101477-let.fixed +++ b/tests/ui/parser/issues/issue-101477-let.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x = 2; //~ ERROR unexpected `==` diff --git a/tests/ui/parser/issues/issue-101477-let.rs b/tests/ui/parser/issues/issue-101477-let.rs index 8b0e8bee179..edfcbbf8e8f 100644 --- a/tests/ui/parser/issues/issue-101477-let.rs +++ b/tests/ui/parser/issues/issue-101477-let.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let x == 2; //~ ERROR unexpected `==` diff --git a/tests/ui/parser/issues/issue-103381.fixed b/tests/ui/parser/issues/issue-103381.fixed index 6a9fb991097..9b63bf206a0 100644 --- a/tests/ui/parser/issues/issue-103381.fixed +++ b/tests/ui/parser/issues/issue-103381.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(let_chains)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-103381.rs b/tests/ui/parser/issues/issue-103381.rs index bf79e10103e..a44a7410aaf 100644 --- a/tests/ui/parser/issues/issue-103381.rs +++ b/tests/ui/parser/issues/issue-103381.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![feature(let_chains)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-103451.rs b/tests/ui/parser/issues/issue-103451.rs index be33213f3cb..6b0928229e9 100644 --- a/tests/ui/parser/issues/issue-103451.rs +++ b/tests/ui/parser/issues/issue-103451.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter struct R { } struct S { x: [u8; R diff --git a/tests/ui/parser/issues/issue-10392-2.fixed b/tests/ui/parser/issues/issue-10392-2.fixed index 3386fac17df..09f2627f816 100644 --- a/tests/ui/parser/issues/issue-10392-2.fixed +++ b/tests/ui/parser/issues/issue-10392-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct A { pub foo: isize } diff --git a/tests/ui/parser/issues/issue-10392-2.rs b/tests/ui/parser/issues/issue-10392-2.rs index 30628ae31c3..7f46c12ccf2 100644 --- a/tests/ui/parser/issues/issue-10392-2.rs +++ b/tests/ui/parser/issues/issue-10392-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct A { pub foo: isize } diff --git a/tests/ui/parser/issues/issue-105209.rs b/tests/ui/parser/issues/issue-105209.rs index 6146b795de1..f4e331523bf 100644 --- a/tests/ui/parser/issues/issue-105209.rs +++ b/tests/ui/parser/issues/issue-105209.rs @@ -1,3 +1,3 @@ -// compile-flags: -Zunpretty=ast-tree +//@ compile-flags: -Zunpretty=ast-tree #![c={#![c[)x //~ ERROR mismatched closing delimiter //~ ERROR this file contains an unclosed delimiter diff --git a/tests/ui/parser/issues/issue-105366.fixed b/tests/ui/parser/issues/issue-105366.fixed index ad26643c327..7157b647524 100644 --- a/tests/ui/parser/issues/issue-105366.fixed +++ b/tests/ui/parser/issues/issue-105366.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/parser/issues/issue-105366.rs b/tests/ui/parser/issues/issue-105366.rs index 311b6a60f1a..dc3cb8b343d 100644 --- a/tests/ui/parser/issues/issue-105366.rs +++ b/tests/ui/parser/issues/issue-105366.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Foo; diff --git a/tests/ui/parser/issues/issue-105634.rs b/tests/ui/parser/issues/issue-105634.rs index 579aa6e5bfb..477807aed7c 100644 --- a/tests/ui/parser/issues/issue-105634.rs +++ b/tests/ui/parser/issues/issue-105634.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { let _a = ..; diff --git a/tests/ui/parser/issues/issue-10636-2.rs b/tests/ui/parser/issues/issue-10636-2.rs index 80d8ef65a69..7200ea1f1dd 100644 --- a/tests/ui/parser/issues/issue-10636-2.rs +++ b/tests/ui/parser/issues/issue-10636-2.rs @@ -1,4 +1,4 @@ -// error-pattern: mismatched closing delimiter: `}` +//@ error-pattern: mismatched closing delimiter: `}` // FIXME(31528) we emit a bunch of silly errors here due to continuing past the // first one. This would be easy-ish to address by better recovery in tokenisation. diff --git a/tests/ui/parser/issues/issue-107705.rs b/tests/ui/parser/issues/issue-107705.rs index b80984fcdb0..b72b02ce3a9 100644 --- a/tests/ui/parser/issues/issue-107705.rs +++ b/tests/ui/parser/issues/issue-107705.rs @@ -1,3 +1,3 @@ -// compile-flags: -C debug-assertions +//@ compile-flags: -C debug-assertions fn f() {a(b:&, //~ ERROR this file contains an unclosed delimiter diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed index b819aa810cb..bddc4719ea3 100644 --- a/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed +++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn missing() -> () {} //~^ ERROR missing parameters for function definition diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.rs b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs index 01efe728081..32257bb4b5a 100644 --- a/tests/ui/parser/issues/issue-108109-fn-missing-params.rs +++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn missing -> () {} //~^ ERROR missing parameters for function definition diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed index eaae288864a..2c776f414e0 100644 --- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed +++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn func() where F: FnOnce() -> () {} //~^ ERROR expected one of diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs index ea5c71150e8..c45541e08b2 100644 --- a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs +++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub fn func() where F: FnOnce -> () {} //~^ ERROR expected one of diff --git a/tests/ui/parser/issues/issue-112188.fixed b/tests/ui/parser/issues/issue-112188.fixed index 5e73d8e38de..a4fdf5567f7 100644 --- a/tests/ui/parser/issues/issue-112188.fixed +++ b/tests/ui/parser/issues/issue-112188.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/parser/issues/issue-112188.rs b/tests/ui/parser/issues/issue-112188.rs index 27ca192e522..70c355b1610 100644 --- a/tests/ui/parser/issues/issue-112188.rs +++ b/tests/ui/parser/issues/issue-112188.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] diff --git a/tests/ui/parser/issues/issue-113203.rs b/tests/ui/parser/issues/issue-113203.rs index 1103251c140..70e5003c63a 100644 --- a/tests/ui/parser/issues/issue-113203.rs +++ b/tests/ui/parser/issues/issue-113203.rs @@ -1,6 +1,6 @@ // Checks what happens when we attempt to use the await keyword as a prefix. Span // incorrectly emitted an `.await` in E0277 which does not exist -// edition:2018 +//@ edition:2018 fn main() { await {}() //~^ ERROR incorrect use of `await` diff --git a/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs b/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs index 3421333b8a0..7edc4ec5aee 100644 --- a/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs +++ b/tests/ui/parser/issues/issue-115780-pat-lt-bracket-in-macro-call.rs @@ -3,7 +3,7 @@ // if we are inside a macro call since it can be valid input for a subsequent macro rule. // See also #103534. -// check-pass +//@ check-pass macro_rules! mdo { ($p: pat =<< $e: expr ; $( $t: tt )*) => { diff --git a/tests/ui/parser/issues/issue-14303-fncall.rs b/tests/ui/parser/issues/issue-14303-fncall.rs index afc4959f175..59d4eab06d6 100644 --- a/tests/ui/parser/issues/issue-14303-fncall.rs +++ b/tests/ui/parser/issues/issue-14303-fncall.rs @@ -1,4 +1,4 @@ -// revisions: full generic_arg +//@ revisions: full generic_arg // can't run rustfix because it doesn't handle multipart suggestions correctly // we need the above to avoid ast borrowck failure in recovered code #![cfg_attr(generic_arg, feature(generic_arg_infer))] diff --git a/tests/ui/parser/issues/issue-17718-parse-const.rs b/tests/ui/parser/issues/issue-17718-parse-const.rs index d5a5f445d5b..e24faeb7d54 100644 --- a/tests/ui/parser/issues/issue-17718-parse-const.rs +++ b/tests/ui/parser/issues/issue-17718-parse-const.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass const FOO: usize = 3; diff --git a/tests/ui/parser/issues/issue-17904.rs b/tests/ui/parser/issues/issue-17904.rs index 020fb41c227..6f77d4bb086 100644 --- a/tests/ui/parser/issues/issue-17904.rs +++ b/tests/ui/parser/issues/issue-17904.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zparse-only +//@ compile-flags: -Zparse-only struct Baz where U: Eq(U); //This is parsed as the new Fn* style parenthesis syntax. struct Baz where U: Eq(U) -> R; // Notice this parses as well. diff --git a/tests/ui/parser/issues/issue-21146.rs b/tests/ui/parser/issues/issue-21146.rs index 19eaffc3edd..81112808b21 100644 --- a/tests/ui/parser/issues/issue-21146.rs +++ b/tests/ui/parser/issues/issue-21146.rs @@ -1,3 +1,3 @@ -// error-pattern: expected one of `!` or `::`, found `` +//@ error-pattern: expected one of `!` or `::`, found `` include!("auxiliary/issue-21146-inc.rs"); fn main() {} diff --git a/tests/ui/parser/issues/issue-21475.rs b/tests/ui/parser/issues/issue-21475.rs index b028fcae077..27248179ef4 100644 --- a/tests/ui/parser/issues/issue-21475.rs +++ b/tests/ui/parser/issues/issue-21475.rs @@ -1,6 +1,6 @@ -// run-pass +//@ run-pass #![allow(unused_imports, overlapping_range_endpoints)] -// pretty-expanded FIXME #23616 +//@ pretty-expanded FIXME #23616 use m::{START, END}; diff --git a/tests/ui/parser/issues/issue-30318.fixed b/tests/ui/parser/issues/issue-30318.fixed index 71fc82172a5..d1661be5193 100644 --- a/tests/ui/parser/issues/issue-30318.fixed +++ b/tests/ui/parser/issues/issue-30318.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() { } diff --git a/tests/ui/parser/issues/issue-30318.rs b/tests/ui/parser/issues/issue-30318.rs index 465dca2ff82..6f055cd4f7e 100644 --- a/tests/ui/parser/issues/issue-30318.rs +++ b/tests/ui/parser/issues/issue-30318.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] fn foo() { } diff --git a/tests/ui/parser/issues/issue-3036.fixed b/tests/ui/parser/issues/issue-3036.fixed index e5d5622e6fc..14f8a401647 100644 --- a/tests/ui/parser/issues/issue-3036.fixed +++ b/tests/ui/parser/issues/issue-3036.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Testing that semicolon tokens are printed correctly in errors diff --git a/tests/ui/parser/issues/issue-3036.rs b/tests/ui/parser/issues/issue-3036.rs index 2f76fb99b22..f6ce6222d4a 100644 --- a/tests/ui/parser/issues/issue-3036.rs +++ b/tests/ui/parser/issues/issue-3036.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Testing that semicolon tokens are printed correctly in errors diff --git a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs index c1c847d92d0..316c612940c 100644 --- a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs +++ b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 #![crate_type = "lib"] #![feature(type_ascription)] use std::future::Future; diff --git a/tests/ui/parser/issues/issue-46186.fixed b/tests/ui/parser/issues/issue-46186.fixed index 2cb5a4996ee..0165f66a4ea 100644 --- a/tests/ui/parser/issues/issue-46186.fixed +++ b/tests/ui/parser/issues/issue-46186.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Struct { pub a: usize, diff --git a/tests/ui/parser/issues/issue-46186.rs b/tests/ui/parser/issues/issue-46186.rs index 84cad38c5ec..eec478ce164 100644 --- a/tests/ui/parser/issues/issue-46186.rs +++ b/tests/ui/parser/issues/issue-46186.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub struct Struct { pub a: usize, diff --git a/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs b/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs index 8592f8a7287..27099f543cc 100644 --- a/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs +++ b/tests/ui/parser/issues/issue-48137-macros-cannot-interpolate-impl-items.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/issues/issue-48508-aux.rs b/tests/ui/parser/issues/issue-48508-aux.rs index ebdc70a04df..0f2b4427383 100644 --- a/tests/ui/parser/issues/issue-48508-aux.rs +++ b/tests/ui/parser/issues/issue-48508-aux.rs @@ -1,5 +1,5 @@ -// run-pass -// ignore-test Not a test. Used by issue-48508.rs +//@ run-pass +//@ ignore-test Not a test. Used by issue-48508.rs pub fn other() -> f64 { let µ = 1.0; diff --git a/tests/ui/parser/issues/issue-48508.rs b/tests/ui/parser/issues/issue-48508.rs index b66e09620f4..54adfce93a4 100644 --- a/tests/ui/parser/issues/issue-48508.rs +++ b/tests/ui/parser/issues/issue-48508.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Regression test for issue #48508: // // Confusion between global and local file offsets caused incorrect handling of multibyte character @@ -6,7 +6,7 @@ // when a multibyte character is at the end of a scope. The problematic code is actually in // issue-48508-aux.rs -// compile-flags:-g +//@ compile-flags:-g #![allow(uncommon_codepoints)] diff --git a/tests/ui/parser/issues/issue-48636.fixed b/tests/ui/parser/issues/issue-48636.fixed index 87c19a32d4c..921eb4ef685 100644 --- a/tests/ui/parser/issues/issue-48636.fixed +++ b/tests/ui/parser/issues/issue-48636.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/parser/issues/issue-48636.rs b/tests/ui/parser/issues/issue-48636.rs index 8610dc2f72e..269f11fa4a8 100644 --- a/tests/ui/parser/issues/issue-48636.rs +++ b/tests/ui/parser/issues/issue-48636.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/parser/issues/issue-54521-1.rs b/tests/ui/parser/issues/issue-54521-1.rs index 8a682ef0a11..e80cb55eaeb 100644 --- a/tests/ui/parser/issues/issue-54521-1.rs +++ b/tests/ui/parser/issues/issue-54521-1.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // This test checks that the `remove extra angle brackets` error doesn't happen for some // potential edge-cases.. diff --git a/tests/ui/parser/issues/issue-54521-2.fixed b/tests/ui/parser/issues/issue-54521-2.fixed index a91c4fe43ea..63ca4c65192 100644 --- a/tests/ui/parser/issues/issue-54521-2.fixed +++ b/tests/ui/parser/issues/issue-54521-2.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-2.rs b/tests/ui/parser/issues/issue-54521-2.rs index 3639aac87ee..0f3d9232ca1 100644 --- a/tests/ui/parser/issues/issue-54521-2.rs +++ b/tests/ui/parser/issues/issue-54521-2.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-3.fixed b/tests/ui/parser/issues/issue-54521-3.fixed index 84ab6866cf1..47ae6b9ebc5 100644 --- a/tests/ui/parser/issues/issue-54521-3.fixed +++ b/tests/ui/parser/issues/issue-54521-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-54521-3.rs b/tests/ui/parser/issues/issue-54521-3.rs index f1d68504178..94037c82e4e 100644 --- a/tests/ui/parser/issues/issue-54521-3.rs +++ b/tests/ui/parser/issues/issue-54521-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This test checks that the following error is emitted and the suggestion works: // diff --git a/tests/ui/parser/issues/issue-57684.fixed b/tests/ui/parser/issues/issue-57684.fixed index 4a432206d51..a6a6493b43a 100644 --- a/tests/ui/parser/issues/issue-57684.fixed +++ b/tests/ui/parser/issues/issue-57684.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57684.rs b/tests/ui/parser/issues/issue-57684.rs index 7a62785e32f..0ed52c576fe 100644 --- a/tests/ui/parser/issues/issue-57684.rs +++ b/tests/ui/parser/issues/issue-57684.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57819.fixed b/tests/ui/parser/issues/issue-57819.fixed index 3fab21db2d0..0321a32ee39 100644 --- a/tests/ui/parser/issues/issue-57819.fixed +++ b/tests/ui/parser/issues/issue-57819.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-57819.rs b/tests/ui/parser/issues/issue-57819.rs index 5cafbf439be..459e82dd2aa 100644 --- a/tests/ui/parser/issues/issue-57819.rs +++ b/tests/ui/parser/issues/issue-57819.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(warnings)] diff --git a/tests/ui/parser/issues/issue-5806.rs b/tests/ui/parser/issues/issue-5806.rs index b694642a9c5..3f1b7cda931 100644 --- a/tests/ui/parser/issues/issue-5806.rs +++ b/tests/ui/parser/issues/issue-5806.rs @@ -1,5 +1,5 @@ -// normalize-stderr-test: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" +//@ normalize-stderr-test: "parser:.*\(" -> "parser: $$ACCESS_DENIED_MSG (" +//@ normalize-stderr-test: "os error \d+" -> "os error $$ACCESS_DENIED_CODE" #[path = "../parser"] mod foo; //~ ERROR couldn't read diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs index a2ea8ad368b..7952d29c260 100644 --- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs +++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs @@ -1,5 +1,5 @@ // Fixed in #66054. // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to 1 previous error +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: aborting due to 1 previous error #[Ѕ \ No newline at end of file diff --git a/tests/ui/parser/issues/issue-62524.rs b/tests/ui/parser/issues/issue-62524.rs index dd86fc9a7f8..a219f662cf7 100644 --- a/tests/ui/parser/issues/issue-62524.rs +++ b/tests/ui/parser/issues/issue-62524.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// error-pattern: aborting due to 1 previous error +//@ error-pattern: aborting due to 1 previous error #![allow(uncommon_codepoints)] y![ diff --git a/tests/ui/parser/issues/issue-62554.rs b/tests/ui/parser/issues/issue-62554.rs index 4b463a17333..9f196e4b0d6 100644 --- a/tests/ui/parser/issues/issue-62554.rs +++ b/tests/ui/parser/issues/issue-62554.rs @@ -1,4 +1,4 @@ -// error-pattern:this file contains an unclosed delimiter +//@ error-pattern:this file contains an unclosed delimiter fn main() {} diff --git a/tests/ui/parser/issues/issue-62894.rs b/tests/ui/parser/issues/issue-62894.rs index 4dfa406ea2d..5b1627a2553 100644 --- a/tests/ui/parser/issues/issue-62894.rs +++ b/tests/ui/parser/issues/issue-62894.rs @@ -1,5 +1,5 @@ // Regression test for #62894, shouldn't crash. -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f() { assert_eq!(f(), (), assert_eq!(assert_eq! diff --git a/tests/ui/parser/issues/issue-62973.rs b/tests/ui/parser/issues/issue-62973.rs index 22d75457702..5c666d802fe 100644 --- a/tests/ui/parser/issues/issue-62973.rs +++ b/tests/ui/parser/issues/issue-62973.rs @@ -1,5 +1,5 @@ // ignore-tidy-trailing-newlines -// error-pattern: aborting due to 3 previous errors +//@ error-pattern: aborting due to 3 previous errors fn main() {} diff --git a/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs b/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs index b6e5091b621..d1a5f32b954 100644 --- a/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs +++ b/tests/ui/parser/issues/issue-63115-range-pat-interpolated.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![feature(exclusive_range_pattern)] diff --git a/tests/ui/parser/issues/issue-63116.rs b/tests/ui/parser/issues/issue-63116.rs index 6b9d9cdbeb1..3be9606b4ed 100644 --- a/tests/ui/parser/issues/issue-63116.rs +++ b/tests/ui/parser/issues/issue-63116.rs @@ -1,3 +1,3 @@ // fixed by #66361 -// error-pattern: aborting due to 2 previous errors +//@ error-pattern: aborting due to 2 previous errors impl W { diff --git a/tests/ui/parser/issues/issue-70388-without-witness.fixed b/tests/ui/parser/issues/issue-70388-without-witness.fixed index 58721495dcd..46d42fcaa4b 100644 --- a/tests/ui/parser/issues/issue-70388-without-witness.fixed +++ b/tests/ui/parser/issues/issue-70388-without-witness.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This is for checking if we can apply suggestions as-is. pub struct Foo(#[allow(dead_code)] i32); diff --git a/tests/ui/parser/issues/issue-70388-without-witness.rs b/tests/ui/parser/issues/issue-70388-without-witness.rs index 2e679db5464..b7eb76a4147 100644 --- a/tests/ui/parser/issues/issue-70388-without-witness.rs +++ b/tests/ui/parser/issues/issue-70388-without-witness.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // This is for checking if we can apply suggestions as-is. pub struct Foo(#[allow(dead_code)] i32); diff --git a/tests/ui/parser/issues/issue-7222.rs b/tests/ui/parser/issues/issue-7222.rs index fb18f4cd62e..6f6b34f4f48 100644 --- a/tests/ui/parser/issues/issue-7222.rs +++ b/tests/ui/parser/issues/issue-7222.rs @@ -1,5 +1,5 @@ -// run-pass -// pretty-expanded FIXME #23616 +//@ run-pass +//@ pretty-expanded FIXME #23616 pub fn main() { const FOO: f64 = 10.0; diff --git a/tests/ui/parser/issues/issue-75599.rs b/tests/ui/parser/issues/issue-75599.rs index 0857676e4ed..d36285324e0 100644 --- a/tests/ui/parser/issues/issue-75599.rs +++ b/tests/ui/parser/issues/issue-75599.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_upper_case_globals)] const or: usize = 1; diff --git a/tests/ui/parser/issues/issue-76437-async.rs b/tests/ui/parser/issues/issue-76437-async.rs index 84ee3dd2112..497e269d634 100644 --- a/tests/ui/parser/issues/issue-76437-async.rs +++ b/tests/ui/parser/issues/issue-76437-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { async pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs b/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs index f1e06e4ad89..27594a85312 100644 --- a/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-const-async-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const async unsafe pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const-async.rs b/tests/ui/parser/issues/issue-76437-const-async.rs index 3c789fdcd02..45d53c63933 100644 --- a/tests/ui/parser/issues/issue-76437-const-async.rs +++ b/tests/ui/parser/issues/issue-76437-const-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const async pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-const.rs b/tests/ui/parser/issues/issue-76437-const.rs index d3815a52346..c3431e3567b 100644 --- a/tests/ui/parser/issues/issue-76437-const.rs +++ b/tests/ui/parser/issues/issue-76437-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { const pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs index daa1d120795..6e3039c2228 100644 --- a/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-pub-crate-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { unsafe pub(crate) fn t() {} diff --git a/tests/ui/parser/issues/issue-76437-unsafe.rs b/tests/ui/parser/issues/issue-76437-unsafe.rs index 785a79a79a2..206cc3e6660 100644 --- a/tests/ui/parser/issues/issue-76437-unsafe.rs +++ b/tests/ui/parser/issues/issue-76437-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 mod t { unsafe pub fn t() {} diff --git a/tests/ui/parser/issues/issue-76597.fixed b/tests/ui/parser/issues/issue-76597.fixed index 2d7a30b8361..779b4042cf4 100644 --- a/tests/ui/parser/issues/issue-76597.fixed +++ b/tests/ui/parser/issues/issue-76597.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-76597.rs b/tests/ui/parser/issues/issue-76597.rs index 521b9c64b1c..d78761df18e 100644 --- a/tests/ui/parser/issues/issue-76597.rs +++ b/tests/ui/parser/issues/issue-76597.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] #![allow(unused_variables)] diff --git a/tests/ui/parser/issues/issue-81804.rs b/tests/ui/parser/issues/issue-81804.rs index ebc4752a142..7c9e6e90582 100644 --- a/tests/ui/parser/issues/issue-81804.rs +++ b/tests/ui/parser/issues/issue-81804.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn main() {} diff --git a/tests/ui/parser/issues/issue-81827.rs b/tests/ui/parser/issues/issue-81827.rs index 91defd12a57..a2bd345fc05 100644 --- a/tests/ui/parser/issues/issue-81827.rs +++ b/tests/ui/parser/issues/issue-81827.rs @@ -1,5 +1,5 @@ -// error-pattern: this file contains an unclosed delimiter -// error-pattern: mismatched closing delimiter: `]` +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: mismatched closing delimiter: `]` #![crate_name="0"] diff --git a/tests/ui/parser/issues/issue-83639.rs b/tests/ui/parser/issues/issue-83639.rs index 6ddbedfa0bc..d22ef9b09e6 100644 --- a/tests/ui/parser/issues/issue-83639.rs +++ b/tests/ui/parser/issues/issue-83639.rs @@ -1,4 +1,4 @@ -// check-fail +//@ check-fail // ignore-tidy-tab fn main() { diff --git a/tests/ui/parser/issues/issue-84104.rs b/tests/ui/parser/issues/issue-84104.rs index 962eb69bd83..bced05e684a 100644 --- a/tests/ui/parser/issues/issue-84104.rs +++ b/tests/ui/parser/issues/issue-84104.rs @@ -1,2 +1,2 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter #[i=i::<ښܖ< diff --git a/tests/ui/parser/issues/issue-84148-2.rs b/tests/ui/parser/issues/issue-84148-2.rs index e677abde5f6..560475bd32c 100644 --- a/tests/ui/parser/issues/issue-84148-2.rs +++ b/tests/ui/parser/issues/issue-84148-2.rs @@ -1,2 +1,2 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter fn f(t:for<>t? diff --git a/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed b/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed index 53f071db781..63c4515985d 100644 --- a/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed +++ b/tests/ui/parser/issues/issue-87197-missing-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Parser should know when a semicolon is missing. // https://github.com/rust-lang/rust/issues/87197 diff --git a/tests/ui/parser/issues/issue-87197-missing-semicolon.rs b/tests/ui/parser/issues/issue-87197-missing-semicolon.rs index db0edf4529c..9a743b188c3 100644 --- a/tests/ui/parser/issues/issue-87197-missing-semicolon.rs +++ b/tests/ui/parser/issues/issue-87197-missing-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Parser should know when a semicolon is missing. // https://github.com/rust-lang/rust/issues/87197 diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs index 099178a7d50..694729376ba 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/const-async-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // Test that even when `const` is already present, the proposed fix is to remove the second `const` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs index 47942662685..40f993eafbb 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/several-kw-jump.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs index 867f71c1204..c260c721346 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-async.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs index 9a7f28210f9..bdfe248693e 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-const.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs index 8305ff4f623..34b687a0f52 100644 --- a/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs +++ b/tests/ui/parser/issues/issue-87217-keyword-order/wrong-unsafe.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 // There is an order to respect for keywords before a function: // `, const, async, unsafe, extern, ""` diff --git a/tests/ui/parser/issues/issue-88276-unary-plus.fixed b/tests/ui/parser/issues/issue-88276-unary-plus.fixed index 25b7c340f60..d991d46c097 100644 --- a/tests/ui/parser/issues/issue-88276-unary-plus.fixed +++ b/tests/ui/parser/issues/issue-88276-unary-plus.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_parens)] fn main() { let _ = 1; //~ ERROR leading `+` is not supported diff --git a/tests/ui/parser/issues/issue-88276-unary-plus.rs b/tests/ui/parser/issues/issue-88276-unary-plus.rs index 11b2e9d6016..bcdf28cdb1a 100644 --- a/tests/ui/parser/issues/issue-88276-unary-plus.rs +++ b/tests/ui/parser/issues/issue-88276-unary-plus.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #[allow(unused_parens)] fn main() { let _ = +1; //~ ERROR leading `+` is not supported diff --git a/tests/ui/parser/issues/issue-88583-union-as-ident.rs b/tests/ui/parser/issues/issue-88583-union-as-ident.rs index b3d66d46b1d..a18bd0aeee6 100644 --- a/tests/ui/parser/issues/issue-88583-union-as-ident.rs +++ b/tests/ui/parser/issues/issue-88583-union-as-ident.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] diff --git a/tests/ui/parser/issues/issue-88770.rs b/tests/ui/parser/issues/issue-88770.rs index 9341415b2d9..ecc50481f65 100644 --- a/tests/ui/parser/issues/issue-88770.rs +++ b/tests/ui/parser/issues/issue-88770.rs @@ -1,6 +1,6 @@ // Regression test for the ICE described in #88770. -// error-pattern:this file contains an unclosed delimiter +//@ error-pattern:this file contains an unclosed delimiter fn m(){print!("",(c for&g u diff --git a/tests/ui/parser/issues/issue-89396.fixed b/tests/ui/parser/issues/issue-89396.fixed index 0c040ddea44..c31858d4a89 100644 --- a/tests/ui/parser/issues/issue-89396.fixed +++ b/tests/ui/parser/issues/issue-89396.fixed @@ -1,7 +1,7 @@ // Regression test for issue #89396: Try to recover from a // `=>` -> `=` or `->` typo in a match arm. -// run-rustfix +//@ run-rustfix fn main() { let opt = Some(42); diff --git a/tests/ui/parser/issues/issue-89396.rs b/tests/ui/parser/issues/issue-89396.rs index d95f666d797..b93820715fe 100644 --- a/tests/ui/parser/issues/issue-89396.rs +++ b/tests/ui/parser/issues/issue-89396.rs @@ -1,7 +1,7 @@ // Regression test for issue #89396: Try to recover from a // `=>` -> `=` or `->` typo in a match arm. -// run-rustfix +//@ run-rustfix fn main() { let opt = Some(42); diff --git a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs index fe67d9822fc..51bb04dba19 100644 --- a/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs +++ b/tests/ui/parser/issues/issue-89971-outer-attr-following-inner-attr-ice.rs @@ -1,4 +1,4 @@ -// aux-build:issue-89971-outer-attr-following-inner-attr-ice.rs +//@ aux-build:issue-89971-outer-attr-following-inner-attr-ice.rs #[macro_use] extern crate issue_89971_outer_attr_following_inner_attr_ice; diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed index 4b4a416b1ac..37fa7fa54b6 100644 --- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed +++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub enum Range { //~^ ERROR `enum` and `struct` are mutually exclusive diff --git a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs index 9cc88664129..8df82be0aba 100644 --- a/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs +++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix pub enum struct Range { //~^ ERROR `enum` and `struct` are mutually exclusive diff --git a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed index 64ab6f62b77..0c8b36f6f2e 100644 --- a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed +++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { const _FOO: i32 = 123; diff --git a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs index 50520971ffb..55cabf533ac 100644 --- a/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs +++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { const let _FOO: i32 = 123; diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed index 7b73dfb02df..64c06d608df 100644 --- a/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match 1 { 1 => {} //~ ERROR diff --git a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs index 92143fcf3f7..8ef31b230a3 100644 --- a/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs +++ b/tests/ui/parser/issues/recover-ge-as-fat-arrow.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { match 1 { 1 >= {} //~ ERROR diff --git a/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs b/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs index acfdd3c363f..4edbee54de6 100644 --- a/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs +++ b/tests/ui/parser/item-free-const-no-body-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a free `const` item can omit its body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs b/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs index db0039204d8..df5192645e1 100644 --- a/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs +++ b/tests/ui/parser/item-free-static-no-body-syntactic-pass.rs @@ -1,6 +1,6 @@ // Syntactically, a free `const` item can omit its body. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs b/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs index 58fc926d08f..80de3cfc668 100644 --- a/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs +++ b/tests/ui/parser/item-free-type-bounds-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/item-kw-case-mismatch.fixed b/tests/ui/parser/item-kw-case-mismatch.fixed index 4b99537fbf7..f5afa482712 100644 --- a/tests/ui/parser/item-kw-case-mismatch.fixed +++ b/tests/ui/parser/item-kw-case-mismatch.fixed @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(unused_imports)] fn main() {} diff --git a/tests/ui/parser/item-kw-case-mismatch.rs b/tests/ui/parser/item-kw-case-mismatch.rs index b11ec93754f..ea224e08a00 100644 --- a/tests/ui/parser/item-kw-case-mismatch.rs +++ b/tests/ui/parser/item-kw-case-mismatch.rs @@ -1,5 +1,5 @@ -// run-rustfix -// edition:2018 +//@ run-rustfix +//@ edition:2018 #![allow(unused_imports)] fn main() {} diff --git a/tests/ui/parser/keyword-try-as-identifier-edition2018.rs b/tests/ui/parser/keyword-try-as-identifier-edition2018.rs index 4fa37bdb057..27452f4d45e 100644 --- a/tests/ui/parser/keyword-try-as-identifier-edition2018.rs +++ b/tests/ui/parser/keyword-try-as-identifier-edition2018.rs @@ -1,4 +1,4 @@ -// compile-flags: --edition 2018 +//@ compile-flags: --edition 2018 fn main() { let try = "foo"; //~ error: expected identifier, found reserved keyword `try` diff --git a/tests/ui/parser/keyword-union-as-identifier.rs b/tests/ui/parser/keyword-union-as-identifier.rs index 7062557d731..8b4a8944276 100644 --- a/tests/ui/parser/keyword-union-as-identifier.rs +++ b/tests/ui/parser/keyword-union-as-identifier.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] diff --git a/tests/ui/parser/kw-in-trait-bounds.rs b/tests/ui/parser/kw-in-trait-bounds.rs index e9e85339aff..16d23672ca3 100644 --- a/tests/ui/parser/kw-in-trait-bounds.rs +++ b/tests/ui/parser/kw-in-trait-bounds.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn _f(_: impl fn(), _: &dyn fn()) //~^ ERROR expected identifier, found keyword `fn` diff --git a/tests/ui/parser/let-binop.fixed b/tests/ui/parser/let-binop.fixed index 93f7f97b04f..83eff697f89 100644 --- a/tests/ui/parser/let-binop.fixed +++ b/tests/ui/parser/let-binop.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: i8 = 1; //~ ERROR can't reassign to an uninitialized variable diff --git a/tests/ui/parser/let-binop.rs b/tests/ui/parser/let-binop.rs index 2adbceae5d3..16e46cd4d6c 100644 --- a/tests/ui/parser/let-binop.rs +++ b/tests/ui/parser/let-binop.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let a: i8 *= 1; //~ ERROR can't reassign to an uninitialized variable diff --git a/tests/ui/parser/lifetime-semicolon.fixed b/tests/ui/parser/lifetime-semicolon.fixed index 482b7704695..e9b6ab54b1f 100644 --- a/tests/ui/parser/lifetime-semicolon.fixed +++ b/tests/ui/parser/lifetime-semicolon.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct Foo<'a, 'b> { a: &'a &'b i32 diff --git a/tests/ui/parser/lifetime-semicolon.rs b/tests/ui/parser/lifetime-semicolon.rs index 21c8b0a7f88..158c5ccdcdf 100644 --- a/tests/ui/parser/lifetime-semicolon.rs +++ b/tests/ui/parser/lifetime-semicolon.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused)] struct Foo<'a, 'b> { a: &'a &'b i32 diff --git a/tests/ui/parser/macro-braces-dot-question.rs b/tests/ui/parser/macro-braces-dot-question.rs index 016b434a612..9b070f201b5 100644 --- a/tests/ui/parser/macro-braces-dot-question.rs +++ b/tests/ui/parser/macro-braces-dot-question.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass use std::io::Write; diff --git a/tests/ui/parser/macro/macro-expand-to-field.rs b/tests/ui/parser/macro/macro-expand-to-field.rs index 533511ecf5a..ccdcf013cd2 100644 --- a/tests/ui/parser/macro/macro-expand-to-field.rs +++ b/tests/ui/parser/macro/macro-expand-to-field.rs @@ -1,4 +1,4 @@ -// compile-flags: --crate-type=lib +//@ compile-flags: --crate-type=lib // https://github.com/rust-lang/rust/issues/113766 diff --git a/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs b/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs index fe062d62e5a..494e58c1ca5 100644 --- a/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs +++ b/tests/ui/parser/macro/mbe-bare-trait-object-maybe-trait-bound.rs @@ -3,8 +3,8 @@ // even in newer editions like Rust 2021. // Therefore the arm `?$Trait:path` shouldn't get reached. -// edition: 2021 -// check-pass +//@ edition: 2021 +//@ check-pass macro_rules! check { ($Ty:ty) => {}; diff --git a/tests/ui/parser/match-refactor-to-expr.fixed b/tests/ui/parser/match-refactor-to-expr.fixed index 423147b27aa..bee49af9c95 100644 --- a/tests/ui/parser/match-refactor-to-expr.fixed +++ b/tests/ui/parser/match-refactor-to-expr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = diff --git a/tests/ui/parser/match-refactor-to-expr.rs b/tests/ui/parser/match-refactor-to-expr.rs index fcba5d0447e..063f534197f 100644 --- a/tests/ui/parser/match-refactor-to-expr.rs +++ b/tests/ui/parser/match-refactor-to-expr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let foo = diff --git a/tests/ui/parser/mbe_missing_right_paren.rs b/tests/ui/parser/mbe_missing_right_paren.rs index 9a92e67da4d..9c57b0ebcfc 100644 --- a/tests/ui/parser/mbe_missing_right_paren.rs +++ b/tests/ui/parser/mbe_missing_right_paren.rs @@ -1,3 +1,3 @@ // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter macro_rules! abc(ؼ \ No newline at end of file diff --git a/tests/ui/parser/missing_right_paren.rs b/tests/ui/parser/missing_right_paren.rs index cc6d30c9cac..bbf4519a713 100644 --- a/tests/ui/parser/missing_right_paren.rs +++ b/tests/ui/parser/missing_right_paren.rs @@ -1,4 +1,4 @@ // ignore-tidy-trailing-newlines -// error-pattern: this file contains an unclosed delimiter -// error-pattern: aborting due to 1 previous error +//@ error-pattern: this file contains an unclosed delimiter +//@ error-pattern: aborting due to 1 previous error fn main((ؼ \ No newline at end of file diff --git a/tests/ui/parser/misspelled-macro-rules.fixed b/tests/ui/parser/misspelled-macro-rules.fixed index 62be913d85f..7471a5641c2 100644 --- a/tests/ui/parser/misspelled-macro-rules.fixed +++ b/tests/ui/parser/misspelled-macro-rules.fixed @@ -1,6 +1,6 @@ // Regression test for issue #91227. -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/parser/misspelled-macro-rules.rs b/tests/ui/parser/misspelled-macro-rules.rs index 4290e6e5e4c..8f63f37d3d3 100644 --- a/tests/ui/parser/misspelled-macro-rules.rs +++ b/tests/ui/parser/misspelled-macro-rules.rs @@ -1,6 +1,6 @@ // Regression test for issue #91227. -// run-rustfix +//@ run-rustfix #![allow(unused_macros)] diff --git a/tests/ui/parser/mod_file_not_exist.rs b/tests/ui/parser/mod_file_not_exist.rs index 7b079eb02dc..80a17163087 100644 --- a/tests/ui/parser/mod_file_not_exist.rs +++ b/tests/ui/parser/mod_file_not_exist.rs @@ -1,4 +1,4 @@ -// ignore-windows +//@ ignore-windows mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` //~^ HELP to create the module `not_a_real_file`, create file diff --git a/tests/ui/parser/mod_file_not_exist_windows.rs b/tests/ui/parser/mod_file_not_exist_windows.rs index 5db21e2bbc7..88780c0c24e 100644 --- a/tests/ui/parser/mod_file_not_exist_windows.rs +++ b/tests/ui/parser/mod_file_not_exist_windows.rs @@ -1,4 +1,4 @@ -// only-windows +//@ only-windows mod not_a_real_file; //~ ERROR file not found for module `not_a_real_file` //~^ HELP to create the module `not_a_real_file`, create file diff --git a/tests/ui/parser/mod_file_with_path_attr.rs b/tests/ui/parser/mod_file_with_path_attr.rs index 9450d89e5f5..e2854f3cc8d 100644 --- a/tests/ui/parser/mod_file_with_path_attr.rs +++ b/tests/ui/parser/mod_file_with_path_attr.rs @@ -1,4 +1,4 @@ -// normalize-stderr-test: "not_a_real_file.rs:.*\(" -> "not_a_real_file.rs: $$FILE_NOT_FOUND_MSG (" +//@ normalize-stderr-test: "not_a_real_file.rs:.*\(" -> "not_a_real_file.rs: $$FILE_NOT_FOUND_MSG (" #[path = "not_a_real_file.rs"] mod m; //~ ERROR not_a_real_file.rs diff --git a/tests/ui/parser/mut-patterns.rs b/tests/ui/parser/mut-patterns.rs index f2d2df0af29..b8610c4e190 100644 --- a/tests/ui/parser/mut-patterns.rs +++ b/tests/ui/parser/mut-patterns.rs @@ -1,6 +1,6 @@ // Can't put mut in non-ident pattern -// edition:2018 +//@ edition:2018 #![feature(box_patterns)] #![allow(warnings)] diff --git a/tests/ui/parser/operator-associativity.rs b/tests/ui/parser/operator-associativity.rs index 4f40c80bc4c..e6082d22cc3 100644 --- a/tests/ui/parser/operator-associativity.rs +++ b/tests/ui/parser/operator-associativity.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Testcase for issue #130, operator associativity. pub fn main() { assert_eq!(3 * 5 / 2, 7); } diff --git a/tests/ui/parser/parse-assoc-type-lt.rs b/tests/ui/parser/parse-assoc-type-lt.rs index 913fcd920bd..f1823ce96b9 100644 --- a/tests/ui/parser/parse-assoc-type-lt.rs +++ b/tests/ui/parser/parse-assoc-type-lt.rs @@ -1,5 +1,5 @@ -// check-pass -// pretty-expanded FIXME #23616 +//@ check-pass +//@ pretty-expanded FIXME #23616 trait Foo { type T; diff --git a/tests/ui/parser/parse-panic.rs b/tests/ui/parser/parse-panic.rs index aeb2ba4faa5..6ef439d4837 100644 --- a/tests/ui/parser/parse-panic.rs +++ b/tests/ui/parser/parse-panic.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] #![allow(unreachable_code)] diff --git a/tests/ui/parser/parser-unicode-whitespace.rs b/tests/ui/parser/parser-unicode-whitespace.rs index 555cd68c3a7..0b1c3186a4f 100644 --- a/tests/ui/parser/parser-unicode-whitespace.rs +++ b/tests/ui/parser/parser-unicode-whitespace.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Beware editing: it has numerous whitespace characters which are important. // It contains one ranges from the 'PATTERN_WHITE_SPACE' property outlined in // https://unicode.org/Public/UNIDATA/PropList.txt diff --git a/tests/ui/parser/pat-tuple-2.rs b/tests/ui/parser/pat-tuple-2.rs index a8f3debd3d6..8bf2a9aa449 100644 --- a/tests/ui/parser/pat-tuple-2.rs +++ b/tests/ui/parser/pat-tuple-2.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() { match (0, 1, 2) { diff --git a/tests/ui/parser/public-instead-of-pub-1.fixed b/tests/ui/parser/public-instead-of-pub-1.fixed index a4fa68ba5cc..dfbd14bb575 100644 --- a/tests/ui/parser/public-instead-of-pub-1.fixed +++ b/tests/ui/parser/public-instead-of-pub-1.fixed @@ -1,5 +1,5 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// run-rustfix +//@ run-rustfix pub enum Test { //~^ ERROR expected one of `!` or `::`, found keyword `enum` diff --git a/tests/ui/parser/public-instead-of-pub-1.rs b/tests/ui/parser/public-instead-of-pub-1.rs index 43565c9b1d2..a783a348be0 100644 --- a/tests/ui/parser/public-instead-of-pub-1.rs +++ b/tests/ui/parser/public-instead-of-pub-1.rs @@ -1,5 +1,5 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// run-rustfix +//@ run-rustfix public enum Test { //~^ ERROR expected one of `!` or `::`, found keyword `enum` diff --git a/tests/ui/parser/public-instead-of-pub-3.fixed b/tests/ui/parser/public-instead-of-pub-3.fixed index 14f620f41e8..dd85df4009d 100644 --- a/tests/ui/parser/public-instead-of-pub-3.fixed +++ b/tests/ui/parser/public-instead-of-pub-3.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod test { pub const X: i32 = 123; //~^ ERROR expected one of `!` or `::`, found keyword `const` diff --git a/tests/ui/parser/public-instead-of-pub-3.rs b/tests/ui/parser/public-instead-of-pub-3.rs index ee27cb1a1a8..d79647ced6f 100644 --- a/tests/ui/parser/public-instead-of-pub-3.rs +++ b/tests/ui/parser/public-instead-of-pub-3.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix mod test { public const X: i32 = 123; //~^ ERROR expected one of `!` or `::`, found keyword `const` diff --git a/tests/ui/parser/public-instead-of-pub.fixed b/tests/ui/parser/public-instead-of-pub.fixed index 01db609990e..69203c4afcf 100644 --- a/tests/ui/parser/public-instead-of-pub.fixed +++ b/tests/ui/parser/public-instead-of-pub.fixed @@ -1,6 +1,6 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix pub struct X; //~^ ERROR expected one of `!` or `::`, found keyword `struct` //~^^ HELP write `pub` instead of `public` to make the item public diff --git a/tests/ui/parser/public-instead-of-pub.rs b/tests/ui/parser/public-instead-of-pub.rs index 18e0fd3af1c..9507477fcd3 100644 --- a/tests/ui/parser/public-instead-of-pub.rs +++ b/tests/ui/parser/public-instead-of-pub.rs @@ -1,6 +1,6 @@ // Checks what happens when `public` is used instead of the correct, `pub` -// edition:2018 -// run-rustfix +//@ edition:2018 +//@ run-rustfix public struct X; //~^ ERROR expected one of `!` or `::`, found keyword `struct` //~^^ HELP write `pub` instead of `public` to make the item public diff --git a/tests/ui/parser/qualified-path-in-turbofish.fixed b/tests/ui/parser/qualified-path-in-turbofish.fixed index 404d2f7762d..1cfd8db6245 100644 --- a/tests/ui/parser/qualified-path-in-turbofish.fixed +++ b/tests/ui/parser/qualified-path-in-turbofish.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait T { type Ty; } diff --git a/tests/ui/parser/qualified-path-in-turbofish.rs b/tests/ui/parser/qualified-path-in-turbofish.rs index 2f4b2ed348b..7aec515cc3d 100644 --- a/tests/ui/parser/qualified-path-in-turbofish.rs +++ b/tests/ui/parser/qualified-path-in-turbofish.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix trait T { type Ty; } diff --git a/tests/ui/parser/range_inclusive.fixed b/tests/ui/parser/range_inclusive.fixed index fe23880d1d4..3f466f0cf10 100644 --- a/tests/ui/parser/range_inclusive.fixed +++ b/tests/ui/parser/range_inclusive.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that inclusive ranges with no end point don't parse. pub fn main() { diff --git a/tests/ui/parser/range_inclusive.rs b/tests/ui/parser/range_inclusive.rs index bc6d2413d26..00ded0d0792 100644 --- a/tests/ui/parser/range_inclusive.rs +++ b/tests/ui/parser/range_inclusive.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Make sure that inclusive ranges with no end point don't parse. pub fn main() { diff --git a/tests/ui/parser/ranges-precedence.rs b/tests/ui/parser/ranges-precedence.rs index db241ed0ccd..14dd6488ff2 100644 --- a/tests/ui/parser/ranges-precedence.rs +++ b/tests/ui/parser/ranges-precedence.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Test that the precedence of ranges is correct diff --git a/tests/ui/parser/raw/raw-str-in-macro-call.rs b/tests/ui/parser/raw/raw-str-in-macro-call.rs index 462c2279f5c..fc3c34cc1dd 100644 --- a/tests/ui/parser/raw/raw-str-in-macro-call.rs +++ b/tests/ui/parser/raw/raw-str-in-macro-call.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass macro_rules! m1 { ($tt:tt #) => () diff --git a/tests/ui/parser/recover/recover-const-async-fn-ptr.rs b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs index 25af8772ced..2d8a3858aa6 100644 --- a/tests/ui/parser/recover/recover-const-async-fn-ptr.rs +++ b/tests/ui/parser/recover/recover-const-async-fn-ptr.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 type T0 = const fn(); //~ ERROR an `fn` pointer type cannot be `const` type T1 = const extern "C" fn(); //~ ERROR an `fn` pointer type cannot be `const` diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed index 6afc2d99355..7d0566632d2 100644 --- a/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Here we test that the parser is able to recover in a situation like // `for ( $pat in $expr )` since that is familiar syntax in other languages. // Instead we suggest that the user writes `for $pat in $expr`. diff --git a/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs index b1716900c49..a8bad49fffc 100644 --- a/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs +++ b/tests/ui/parser/recover/recover-for-loop-parens-around-head.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix // Here we test that the parser is able to recover in a situation like // `for ( $pat in $expr )` since that is familiar syntax in other languages. // Instead we suggest that the user writes `for $pat in $expr`. diff --git a/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed index c2e76444d11..d8ebe0869f8 100644 --- a/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = 1 + 1; //~ ERROR expected `while`, `for`, `loop` or `{` after a label diff --git a/tests/ui/parser/recover/recover-labeled-non-block-expr.rs b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs index fc11c646a8c..062e39643ca 100644 --- a/tests/ui/parser/recover/recover-labeled-non-block-expr.rs +++ b/tests/ui/parser/recover/recover-labeled-non-block-expr.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let _ = 'label: 1 + 1; //~ ERROR expected `while`, `for`, `loop` or `{` after a label diff --git a/tests/ui/parser/recover/recover-missing-semi-before-item.fixed b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed index acb846373cb..6f85452c6fb 100644 --- a/tests/ui/parser/recover/recover-missing-semi-before-item.fixed +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, unused_imports)] diff --git a/tests/ui/parser/recover/recover-missing-semi-before-item.rs b/tests/ui/parser/recover/recover-missing-semi-before-item.rs index ef6cfe3c4ed..f75945b55c2 100644 --- a/tests/ui/parser/recover/recover-missing-semi-before-item.rs +++ b/tests/ui/parser/recover/recover-missing-semi-before-item.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(unused_variables, dead_code, unused_imports)] diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed index 6b9b7fa882a..7e0194d5115 100644 --- a/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let val = 42; let x = match val { diff --git a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs index f523581e2da..d208bc7150d 100644 --- a/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs +++ b/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { let val = 42; let x = match val { diff --git a/tests/ui/parser/recover/recover-unticked-labels.fixed b/tests/ui/parser/recover/recover-unticked-labels.fixed index 159d995b8da..f003550cbc2 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.fixed +++ b/tests/ui/parser/recover/recover-unticked-labels.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'label: loop { break 'label }; //~ error: cannot find value `label` in this scope diff --git a/tests/ui/parser/recover/recover-unticked-labels.rs b/tests/ui/parser/recover/recover-unticked-labels.rs index 56034de6844..2b864f16b84 100644 --- a/tests/ui/parser/recover/recover-unticked-labels.rs +++ b/tests/ui/parser/recover/recover-unticked-labels.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { 'label: loop { break label }; //~ error: cannot find value `label` in this scope diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed index a09ff3e5417..a851300a982 100644 --- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.fixed @@ -1,5 +1,5 @@ // Regression test for issues #100790 and #106439. -// run-rustfix +//@ run-rustfix pub struct Example(#[allow(dead_code)] usize) where diff --git a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs index e86f2a8acb8..10f435859f1 100644 --- a/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs +++ b/tests/ui/parser/recover/recover-where-clause-before-tuple-struct-body-0.rs @@ -1,5 +1,5 @@ // Regression test for issues #100790 and #106439. -// run-rustfix +//@ run-rustfix pub struct Example where diff --git a/tests/ui/parser/removed-syntax/removed-syntax-box.fixed b/tests/ui/parser/removed-syntax/removed-syntax-box.fixed index 09d1304b775..8aec8c4cc43 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-box.fixed +++ b/tests/ui/parser/removed-syntax/removed-syntax-box.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(dead_code)] diff --git a/tests/ui/parser/removed-syntax/removed-syntax-box.rs b/tests/ui/parser/removed-syntax/removed-syntax-box.rs index 1f5061b02c7..b77880e3755 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-box.rs +++ b/tests/ui/parser/removed-syntax/removed-syntax-box.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn main() { #[allow(dead_code)] diff --git a/tests/ui/parser/self-param-syntactic-pass.rs b/tests/ui/parser/self-param-syntactic-pass.rs index d7bb7863c07..c7fdc529716 100644 --- a/tests/ui/parser/self-param-syntactic-pass.rs +++ b/tests/ui/parser/self-param-syntactic-pass.rs @@ -1,7 +1,7 @@ // This test ensures that `self` is syntactically accepted in all places an `FnDecl` is parsed. // FIXME(Centril): For now closures are an exception. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/semi-after-closure-in-macro.rs b/tests/ui/parser/semi-after-closure-in-macro.rs index 14efb6100b0..1eeb04b8833 100644 --- a/tests/ui/parser/semi-after-closure-in-macro.rs +++ b/tests/ui/parser/semi-after-closure-in-macro.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Checks that the fix in #103222 doesn't also disqualify semicolons after // closures within parentheses *in macros*, where they're totally allowed. diff --git a/tests/ui/parser/shebang/multiline-attrib.rs b/tests/ui/parser/shebang/multiline-attrib.rs index 931c94c7fba..bb083610e55 100644 --- a/tests/ui/parser/shebang/multiline-attrib.rs +++ b/tests/ui/parser/shebang/multiline-attrib.rs @@ -1,6 +1,6 @@ #! [allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; diff --git a/tests/ui/parser/shebang/regular-attrib.rs b/tests/ui/parser/shebang/regular-attrib.rs index ca8fb0830ff..aed633d3ef1 100644 --- a/tests/ui/parser/shebang/regular-attrib.rs +++ b/tests/ui/parser/shebang/regular-attrib.rs @@ -1,5 +1,5 @@ #![allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; } diff --git a/tests/ui/parser/shebang/shebang-and-attrib.rs b/tests/ui/parser/shebang/shebang-and-attrib.rs index 61b89c655a3..a66c10db532 100644 --- a/tests/ui/parser/shebang/shebang-and-attrib.rs +++ b/tests/ui/parser/shebang/shebang-and-attrib.rs @@ -1,6 +1,6 @@ #!/usr/bin/env run-cargo-script -// check-pass +//@ check-pass #![allow(unused_variables)] diff --git a/tests/ui/parser/shebang/shebang-comment.rs b/tests/ui/parser/shebang/shebang-comment.rs index 2b1ab0c574d..37bcac8b29e 100644 --- a/tests/ui/parser/shebang/shebang-comment.rs +++ b/tests/ui/parser/shebang/shebang-comment.rs @@ -1,6 +1,6 @@ #!//bin/bash -// check-pass +//@ check-pass fn main() { println!("a valid shebang (that is also a rust comment)") } diff --git a/tests/ui/parser/shebang/shebang-empty.rs b/tests/ui/parser/shebang/shebang-empty.rs index e38cc637e94..bb0df599783 100644 --- a/tests/ui/parser/shebang/shebang-empty.rs +++ b/tests/ui/parser/shebang/shebang-empty.rs @@ -1,4 +1,4 @@ #! -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/shebang/shebang-space.rs b/tests/ui/parser/shebang/shebang-space.rs index 0978b759d2a..cc58eed8b8a 100644 --- a/tests/ui/parser/shebang/shebang-space.rs +++ b/tests/ui/parser/shebang/shebang-space.rs @@ -1,5 +1,5 @@ #! -// check-pass +//@ check-pass // ignore-tidy-end-whitespace fn main() {} diff --git a/tests/ui/parser/shebang/sneaky-attrib.rs b/tests/ui/parser/shebang/sneaky-attrib.rs index b406cc3aa13..eb814c6af24 100644 --- a/tests/ui/parser/shebang/sneaky-attrib.rs +++ b/tests/ui/parser/shebang/sneaky-attrib.rs @@ -10,7 +10,7 @@ [allow(unused_variables)] -// check-pass +//@ check-pass fn main() { let x = 5; } diff --git a/tests/ui/parser/shebang/valid-shebang.rs b/tests/ui/parser/shebang/valid-shebang.rs index e480d3da3fc..e59d4074ddf 100644 --- a/tests/ui/parser/shebang/valid-shebang.rs +++ b/tests/ui/parser/shebang/valid-shebang.rs @@ -1,6 +1,6 @@ #!/usr/bin/env run-cargo-script -// check-pass +//@ check-pass fn main() { println!("Hello World!"); } diff --git a/tests/ui/parser/slowparse-bstring.rs b/tests/ui/parser/slowparse-bstring.rs index f3a6a668372..facfa8bb852 100644 --- a/tests/ui/parser/slowparse-bstring.rs +++ b/tests/ui/parser/slowparse-bstring.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/slowparse-string.rs b/tests/ui/parser/slowparse-string.rs index 6ebc61dae78..977aa7c8766 100644 --- a/tests/ui/parser/slowparse-string.rs +++ b/tests/ui/parser/slowparse-string.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // ignore-tidy-linelength // Issue #16624 diff --git a/tests/ui/parser/stripped-nested-outline-mod-pass.rs b/tests/ui/parser/stripped-nested-outline-mod-pass.rs index 1b4669a439f..8909d8ae0eb 100644 --- a/tests/ui/parser/stripped-nested-outline-mod-pass.rs +++ b/tests/ui/parser/stripped-nested-outline-mod-pass.rs @@ -1,7 +1,7 @@ // Expansion drives parsing, so conditional compilation will strip // out outline modules and we will never attempt parsing them. -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed b/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed index 28191b82621..be6ed053c6e 100644 --- a/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed +++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] enum E { diff --git a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs index 924cb08a990..7900d397a5d 100644 --- a/tests/ui/parser/struct-default-values-and-missing-field-separator.rs +++ b/tests/ui/parser/struct-default-values-and-missing-field-separator.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] enum E { diff --git a/tests/ui/parser/struct-filed-with-attr.fixed b/tests/ui/parser/struct-filed-with-attr.fixed index a799ec8ca2e..38ae446166a 100644 --- a/tests/ui/parser/struct-filed-with-attr.fixed +++ b/tests/ui/parser/struct-filed-with-attr.fixed @@ -1,5 +1,5 @@ // Issue: 100461, Try to give a helpful diagnostic even when the next struct field has an attribute. -// run-rustfix +//@ run-rustfix struct Feelings { owo: bool, diff --git a/tests/ui/parser/struct-filed-with-attr.rs b/tests/ui/parser/struct-filed-with-attr.rs index bfc78e15b5b..f8eac6251e2 100644 --- a/tests/ui/parser/struct-filed-with-attr.rs +++ b/tests/ui/parser/struct-filed-with-attr.rs @@ -1,5 +1,5 @@ // Issue: 100461, Try to give a helpful diagnostic even when the next struct field has an attribute. -// run-rustfix +//@ run-rustfix struct Feelings { owo: bool diff --git a/tests/ui/parser/struct-literal-in-match-guard.rs b/tests/ui/parser/struct-literal-in-match-guard.rs index bbee60e2817..ced01e08621 100644 --- a/tests/ui/parser/struct-literal-in-match-guard.rs +++ b/tests/ui/parser/struct-literal-in-match-guard.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // Unlike `if` condition, `match` guards accept struct literals. // This is detected in . diff --git a/tests/ui/parser/suggest-assoc-const.fixed b/tests/ui/parser/suggest-assoc-const.fixed index 4229135ebb2..de7f2cbaaba 100644 --- a/tests/ui/parser/suggest-assoc-const.fixed +++ b/tests/ui/parser/suggest-assoc-const.fixed @@ -1,5 +1,5 @@ // Issue: 101797, Suggest associated const for incorrect use of let in traits -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Trait { const _X: i32; diff --git a/tests/ui/parser/suggest-assoc-const.rs b/tests/ui/parser/suggest-assoc-const.rs index 0cf695bd40a..6d0244130a9 100644 --- a/tests/ui/parser/suggest-assoc-const.rs +++ b/tests/ui/parser/suggest-assoc-const.rs @@ -1,5 +1,5 @@ // Issue: 101797, Suggest associated const for incorrect use of let in traits -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Trait { let _X: i32; diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed index 81ee6cdf0a7..e8785eea307 100644 --- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed +++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs index c8f525fc4f0..c5d7fa6412e 100644 --- a/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs +++ b/tests/ui/parser/suggest-removing-semicolon-after-impl-trait-items.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] trait Foo { diff --git a/tests/ui/parser/suggest-semicolon-before-array.fixed b/tests/ui/parser/suggest-semicolon-before-array.fixed index a06b58b2740..219e2ae28b2 100644 --- a/tests/ui/parser/suggest-semicolon-before-array.fixed +++ b/tests/ui/parser/suggest-semicolon-before-array.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn foo() {} diff --git a/tests/ui/parser/suggest-semicolon-before-array.rs b/tests/ui/parser/suggest-semicolon-before-array.rs index f601ca2aef5..382769b84c8 100644 --- a/tests/ui/parser/suggest-semicolon-before-array.rs +++ b/tests/ui/parser/suggest-semicolon-before-array.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix #![allow(dead_code)] fn foo() {} diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.fixed b/tests/ui/parser/suggest_misplaced_generics/enum.fixed index 3332118a1e7..cd9b70323ff 100644 --- a/tests/ui/parser/suggest_misplaced_generics/enum.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/enum.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] enum Foo { Variant(T) } diff --git a/tests/ui/parser/suggest_misplaced_generics/enum.rs b/tests/ui/parser/suggest_misplaced_generics/enum.rs index 5a2289c5c5a..e456347d01e 100644 --- a/tests/ui/parser/suggest_misplaced_generics/enum.rs +++ b/tests/ui/parser/suggest_misplaced_generics/enum.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] enum Foo { Variant(T) } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed index 84bf64bd63c..311be359fe9 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn f<'a, B: 'a + std::ops::Add>(_x: B) { } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs index d0684397e74..9af1206a24b 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs +++ b/tests/ui/parser/suggest_misplaced_generics/fn-complex-generics.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn<'a, B: 'a + std::ops::Add> f(_x: B) { } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed b/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed index cbfd5f2d39c..8d319f7e612 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn id(x: T) -> T { x } diff --git a/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs b/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs index b207cf70d85..c8503473b56 100644 --- a/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs +++ b/tests/ui/parser/suggest_misplaced_generics/fn-simple.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] fn id(x: T) -> T { x } diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.fixed b/tests/ui/parser/suggest_misplaced_generics/struct.fixed index fec05bdeca1..65d26601e10 100644 --- a/tests/ui/parser/suggest_misplaced_generics/struct.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/struct.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Foo { x: T } diff --git a/tests/ui/parser/suggest_misplaced_generics/struct.rs b/tests/ui/parser/suggest_misplaced_generics/struct.rs index 6b80150d546..013ba6e3ce5 100644 --- a/tests/ui/parser/suggest_misplaced_generics/struct.rs +++ b/tests/ui/parser/suggest_misplaced_generics/struct.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] struct Foo { x: T } diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.fixed b/tests/ui/parser/suggest_misplaced_generics/trait.fixed index a471a078af1..1a848ccf7f2 100644 --- a/tests/ui/parser/suggest_misplaced_generics/trait.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/trait.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] trait Foo { diff --git a/tests/ui/parser/suggest_misplaced_generics/trait.rs b/tests/ui/parser/suggest_misplaced_generics/trait.rs index 55355f451f9..a6b843c6cf6 100644 --- a/tests/ui/parser/suggest_misplaced_generics/trait.rs +++ b/tests/ui/parser/suggest_misplaced_generics/trait.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] trait Foo { diff --git a/tests/ui/parser/suggest_misplaced_generics/type.fixed b/tests/ui/parser/suggest_misplaced_generics/type.fixed index a97b9e66d0b..7aa223f2125 100644 --- a/tests/ui/parser/suggest_misplaced_generics/type.fixed +++ b/tests/ui/parser/suggest_misplaced_generics/type.fixed @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] type Foo = T; diff --git a/tests/ui/parser/suggest_misplaced_generics/type.rs b/tests/ui/parser/suggest_misplaced_generics/type.rs index 17e200536fa..db0d8dd22b1 100644 --- a/tests/ui/parser/suggest_misplaced_generics/type.rs +++ b/tests/ui/parser/suggest_misplaced_generics/type.rs @@ -1,5 +1,5 @@ // Issue: 103366 , Suggest fix for misplaced generic params -// run-rustfix +//@ run-rustfix #[allow(unused)] type Foo = T; diff --git a/tests/ui/parser/trailing-plus-in-bounds.rs b/tests/ui/parser/trailing-plus-in-bounds.rs index 400649bcf75..ef9bdadb282 100644 --- a/tests/ui/parser/trailing-plus-in-bounds.rs +++ b/tests/ui/parser/trailing-plus-in-bounds.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/parser/trailing-question-in-type.fixed b/tests/ui/parser/trailing-question-in-type.fixed index 6ea24484e03..47ae66ac677 100644 --- a/tests/ui/parser/trailing-question-in-type.fixed +++ b/tests/ui/parser/trailing-question-in-type.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> Option { //~ ERROR invalid `?` in type let x: Option = Some(1); //~ ERROR invalid `?` in type diff --git a/tests/ui/parser/trailing-question-in-type.rs b/tests/ui/parser/trailing-question-in-type.rs index b1c508365cf..4432ec9380c 100644 --- a/tests/ui/parser/trailing-question-in-type.rs +++ b/tests/ui/parser/trailing-question-in-type.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix fn foo() -> i32? { //~ ERROR invalid `?` in type let x: i32? = Some(1); //~ ERROR invalid `?` in type diff --git a/tests/ui/parser/trait-item-with-defaultness-pass.rs b/tests/ui/parser/trait-item-with-defaultness-pass.rs index a6318bd99e2..c636342f6ca 100644 --- a/tests/ui/parser/trait-item-with-defaultness-pass.rs +++ b/tests/ui/parser/trait-item-with-defaultness-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} diff --git a/tests/ui/parser/trait-object-delimiters.rs b/tests/ui/parser/trait-object-delimiters.rs index 240ae3084d6..84cd16c2796 100644 --- a/tests/ui/parser/trait-object-delimiters.rs +++ b/tests/ui/parser/trait-object-delimiters.rs @@ -1,4 +1,4 @@ -// edition:2018 +//@ edition:2018 fn foo1(_: &dyn Drop + AsRef) {} //~ ERROR ambiguous `+` in a type //~^ ERROR only auto traits can be used as additional traits in a trait object diff --git a/tests/ui/parser/trait-plusequal-splitting.rs b/tests/ui/parser/trait-plusequal-splitting.rs index 6ca6774507b..2824da50d0f 100644 --- a/tests/ui/parser/trait-plusequal-splitting.rs +++ b/tests/ui/parser/trait-plusequal-splitting.rs @@ -1,6 +1,6 @@ // Fixes issue where `+` in generics weren't parsed if they were part of a `+=`. -// check-pass +//@ check-pass struct Whitespace { t: T } struct TokenSplit { t: T } diff --git a/tests/ui/parser/try-with-nonterminal-block.rs b/tests/ui/parser/try-with-nonterminal-block.rs index 2a9652f2e6d..bc52dcd0e01 100644 --- a/tests/ui/parser/try-with-nonterminal-block.rs +++ b/tests/ui/parser/try-with-nonterminal-block.rs @@ -1,5 +1,5 @@ -// check-pass -// edition:2021 +//@ check-pass +//@ edition:2021 #![feature(try_blocks)] diff --git a/tests/ui/parser/unbalanced-doublequote.rs b/tests/ui/parser/unbalanced-doublequote.rs index f2131620537..d9c936186ea 100644 --- a/tests/ui/parser/unbalanced-doublequote.rs +++ b/tests/ui/parser/unbalanced-doublequote.rs @@ -1,4 +1,4 @@ -// error-pattern: unterminated double quote string +//@ error-pattern: unterminated double quote string fn main() { diff --git a/tests/ui/parser/unicode-character-literal.fixed b/tests/ui/parser/unicode-character-literal.fixed index 26ef5ffa11a..9e31890151c 100644 --- a/tests/ui/parser/unicode-character-literal.fixed +++ b/tests/ui/parser/unicode-character-literal.fixed @@ -1,7 +1,7 @@ // Regression test for #88684: Improve diagnostics for combining marks // in character literals. -// run-rustfix +//@ run-rustfix fn main() { let _spade = "♠️"; diff --git a/tests/ui/parser/unicode-character-literal.rs b/tests/ui/parser/unicode-character-literal.rs index d331522c04c..d886e5b26a5 100644 --- a/tests/ui/parser/unicode-character-literal.rs +++ b/tests/ui/parser/unicode-character-literal.rs @@ -1,7 +1,7 @@ // Regression test for #88684: Improve diagnostics for combining marks // in character literals. -// run-rustfix +//@ run-rustfix fn main() { let _spade = '♠️'; diff --git a/tests/ui/parser/use-unclosed-brace.rs b/tests/ui/parser/use-unclosed-brace.rs index fcfe95b26f9..6679651fe47 100644 --- a/tests/ui/parser/use-unclosed-brace.rs +++ b/tests/ui/parser/use-unclosed-brace.rs @@ -1,4 +1,4 @@ -// error-pattern: this file contains an unclosed delimiter +//@ error-pattern: this file contains an unclosed delimiter use foo::{bar, baz; use std::fmt::Display; diff --git a/tests/ui/parser/utf16-be-without-bom.rs b/tests/ui/parser/utf16-be-without-bom.rs index 22aa1971787..68e89bc7c22 100644 Binary files a/tests/ui/parser/utf16-be-without-bom.rs and b/tests/ui/parser/utf16-be-without-bom.rs differ diff --git a/tests/ui/parser/utf16-le-without-bom.rs b/tests/ui/parser/utf16-le-without-bom.rs index 3c1049929e1..bdf4860d016 100644 Binary files a/tests/ui/parser/utf16-le-without-bom.rs and b/tests/ui/parser/utf16-le-without-bom.rs differ diff --git a/tests/ui/parser/utf8_idents-rpass.rs b/tests/ui/parser/utf8_idents-rpass.rs index 206744a58fd..f485f157328 100644 --- a/tests/ui/parser/utf8_idents-rpass.rs +++ b/tests/ui/parser/utf8_idents-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // #![allow(non_snake_case)] diff --git a/tests/ui/parser/variadic-ffi-syntactic-pass.rs b/tests/ui/parser/variadic-ffi-syntactic-pass.rs index 3875d6af137..da81f136216 100644 --- a/tests/ui/parser/variadic-ffi-syntactic-pass.rs +++ b/tests/ui/parser/variadic-ffi-syntactic-pass.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass fn main() {} -- cgit 1.4.1-3-g733a5