summaryrefslogtreecommitdiffstats
path: root/src/test/ui/proc-macro
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/proc-macro')
-rw-r--r--src/test/ui/proc-macro/add-impl.rs14
-rw-r--r--src/test/ui/proc-macro/allowed-attr-stmt-expr.rs78
-rw-r--r--src/test/ui/proc-macro/allowed-attr-stmt-expr.stdout321
-rw-r--r--src/test/ui/proc-macro/ambiguous-builtin-attrs-test.rs20
-rw-r--r--src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr9
-rw-r--r--src/test/ui/proc-macro/ambiguous-builtin-attrs.rs39
-rw-r--r--src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr115
-rw-r--r--src/test/ui/proc-macro/amputate-span.fixed69
-rw-r--r--src/test/ui/proc-macro/amputate-span.rs65
-rw-r--r--src/test/ui/proc-macro/amputate-span.stderr25
-rw-r--r--src/test/ui/proc-macro/append-impl.rs22
-rw-r--r--src/test/ui/proc-macro/attr-args.rs13
-rw-r--r--src/test/ui/proc-macro/attr-cfg.rs27
-rw-r--r--src/test/ui/proc-macro/attr-complex-fn.rs26
-rw-r--r--src/test/ui/proc-macro/attr-complex-fn.stdout171
-rw-r--r--src/test/ui/proc-macro/attr-invalid-exprs.rs28
-rw-r--r--src/test/ui/proc-macro/attr-invalid-exprs.stderr28
-rw-r--r--src/test/ui/proc-macro/attr-on-trait.rs19
-rw-r--r--src/test/ui/proc-macro/attr-stmt-expr-rpass.rs36
-rw-r--r--src/test/ui/proc-macro/attr-stmt-expr.rs66
-rw-r--r--src/test/ui/proc-macro/attr-stmt-expr.stderr21
-rw-r--r--src/test/ui/proc-macro/attr-stmt-expr.stdout274
-rw-r--r--src/test/ui/proc-macro/attribute-after-derive.rs28
-rw-r--r--src/test/ui/proc-macro/attribute-after-derive.stdout192
-rw-r--r--src/test/ui/proc-macro/attribute-spans-preserved.rs10
-rw-r--r--src/test/ui/proc-macro/attribute-spans-preserved.stderr19
-rw-r--r--src/test/ui/proc-macro/attribute-spans-preserved.stdout1
-rw-r--r--src/test/ui/proc-macro/attribute-with-error.rs42
-rw-r--r--src/test/ui/proc-macro/attribute-with-error.stderr35
-rw-r--r--src/test/ui/proc-macro/attribute.rs73
-rw-r--r--src/test/ui/proc-macro/attribute.stderr104
-rw-r--r--src/test/ui/proc-macro/attributes-included.rs22
-rw-r--r--src/test/ui/proc-macro/attributes-included.stderr15
-rw-r--r--src/test/ui/proc-macro/attributes-on-definitions.rs12
-rw-r--r--src/test/ui/proc-macro/attributes-on-definitions.stderr10
-rw-r--r--src/test/ui/proc-macro/attributes-on-modules-fail.rs46
-rw-r--r--src/test/ui/proc-macro/attributes-on-modules-fail.stderr70
-rw-r--r--src/test/ui/proc-macro/attributes-on-modules.rs19
-rw-r--r--src/test/ui/proc-macro/auxiliary/add-impl.rs21
-rw-r--r--src/test/ui/proc-macro/auxiliary/amputate-span.rs14
-rw-r--r--src/test/ui/proc-macro/auxiliary/api/cmp.rs21
-rw-r--r--src/test/ui/proc-macro/auxiliary/api/mod.rs24
-rw-r--r--src/test/ui/proc-macro/auxiliary/api/parse.rs55
-rw-r--r--src/test/ui/proc-macro/auxiliary/append-impl.rs16
-rw-r--r--src/test/ui/proc-macro/auxiliary/assert-span-pos.rs37
-rw-r--r--src/test/ui/proc-macro/auxiliary/attr-args.rs28
-rw-r--r--src/test/ui/proc-macro/auxiliary/attr-cfg.rs21
-rw-r--r--src/test/ui/proc-macro/auxiliary/attr-on-trait.rs15
-rw-r--r--src/test/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs51
-rw-r--r--src/test/ui/proc-macro/auxiliary/attr-stmt-expr.rs49
-rw-r--r--src/test/ui/proc-macro/auxiliary/attribute-spans-preserved.rs35
-rw-r--r--src/test/ui/proc-macro/auxiliary/attributes-included.rs150
-rw-r--r--src/test/ui/proc-macro/auxiliary/attributes-on-definitions.rs23
-rw-r--r--src/test/ui/proc-macro/auxiliary/bang-macro.rs17
-rw-r--r--src/test/ui/proc-macro/auxiliary/bang_proc_macro2.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/builtin-attrs.rs27
-rw-r--r--src/test/ui/proc-macro/auxiliary/call-deprecated.rs19
-rw-r--r--src/test/ui/proc-macro/auxiliary/call-site.rs27
-rw-r--r--src/test/ui/proc-macro/auxiliary/cond_plugin.rs38
-rw-r--r--src/test/ui/proc-macro/auxiliary/count_compound_ops.rs32
-rw-r--r--src/test/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs18
-rw-r--r--src/test/ui/proc-macro/auxiliary/custom-quote.rs32
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-a.rs15
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-atob.rs15
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-attr-cfg.rs14
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-b-rpass.rs17
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-b.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-bad.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-clona.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-ctod.rs15
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-foo.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-helper-shadowed-2.rs2
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs12
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-helper-shadowing.rs15
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-nothing.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-same-struct.rs21
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-two-attrs.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-union.rs18
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-unstable-2.rs17
-rw-r--r--src/test/ui/proc-macro/auxiliary/derive-unstable.rs14
-rw-r--r--src/test/ui/proc-macro/auxiliary/dollar-crate-external.rs22
-rw-r--r--src/test/ui/proc-macro/auxiliary/double.rs16
-rw-r--r--src/test/ui/proc-macro/auxiliary/duplicate.rs32
-rw-r--r--src/test/ui/proc-macro/auxiliary/edition-imports-2015.rs20
-rw-r--r--src/test/ui/proc-macro/auxiliary/empty-crate.rs5
-rw-r--r--src/test/ui/proc-macro/auxiliary/expand-expr.rs166
-rw-r--r--src/test/ui/proc-macro/auxiliary/expand-with-a-macro.rs22
-rw-r--r--src/test/ui/proc-macro/auxiliary/external-crate-var.rs40
-rw-r--r--src/test/ui/proc-macro/auxiliary/first-second.rs20
-rw-r--r--src/test/ui/proc-macro/auxiliary/gen-lifetime-token.rs25
-rw-r--r--src/test/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs23
-rw-r--r--src/test/ui/proc-macro/auxiliary/gen-macro-rules.rs12
-rw-r--r--src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs16
-rw-r--r--src/test/ui/proc-macro/auxiliary/generate-mod.rs58
-rw-r--r--src/test/ui/proc-macro/auxiliary/hygiene_example.rs7
-rw-r--r--src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs27
-rw-r--r--src/test/ui/proc-macro/auxiliary/included-file.txt1
-rw-r--r--src/test/ui/proc-macro/auxiliary/invalid-punct-ident.rs28
-rw-r--r--src/test/ui/proc-macro/auxiliary/is-available.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-104884.rs23
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-38586.rs11
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-39889.rs17
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-42708.rs18
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-50061.rs12
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-50493.rs21
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-59191.rs16
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-66286.rs14
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-75801.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-79242.rs16
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-79825.rs14
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-83510.rs19
-rw-r--r--src/test/ui/proc-macro/auxiliary/issue-91800-macro.rs26
-rw-r--r--src/test/ui/proc-macro/auxiliary/lifetimes-rpass.rs26
-rw-r--r--src/test/ui/proc-macro/auxiliary/lifetimes.rs20
-rw-r--r--src/test/ui/proc-macro/auxiliary/macro-only-syntax.rs89
-rw-r--r--src/test/ui/proc-macro/auxiliary/make-macro.rs18
-rw-r--r--src/test/ui/proc-macro/auxiliary/meta-delim.rs12
-rw-r--r--src/test/ui/proc-macro/auxiliary/meta-macro.rs15
-rw-r--r--src/test/ui/proc-macro/auxiliary/mixed-site-span.rs40
-rw-r--r--src/test/ui/proc-macro/auxiliary/modify-ast.rs47
-rw-r--r--src/test/ui/proc-macro/auxiliary/multiple-derives.rs22
-rw-r--r--src/test/ui/proc-macro/auxiliary/multispan.rs37
-rw-r--r--src/test/ui/proc-macro/auxiliary/negative-token.rs18
-rw-r--r--src/test/ui/proc-macro/auxiliary/nested-macro-rules.rs16
-rw-r--r--src/test/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs25
-rw-r--r--src/test/ui/proc-macro/auxiliary/not-joint.rs30
-rw-r--r--src/test/ui/proc-macro/auxiliary/parent-source-spans.rs43
-rw-r--r--src/test/ui/proc-macro/auxiliary/proc-macro-panic.rs13
-rw-r--r--src/test/ui/proc-macro/auxiliary/raw-ident.rs35
-rw-r--r--src/test/ui/proc-macro/auxiliary/re-export.rs19
-rw-r--r--src/test/ui/proc-macro/auxiliary/recollect.rs12
-rw-r--r--src/test/ui/proc-macro/auxiliary/resolved-located-at.rs31
-rw-r--r--src/test/ui/proc-macro/auxiliary/span-api-tests.rs45
-rw-r--r--src/test/ui/proc-macro/auxiliary/span-from-proc-macro.rs49
-rw-r--r--src/test/ui/proc-macro/auxiliary/span-test-macros.rs9
-rw-r--r--src/test/ui/proc-macro/auxiliary/subspan.rs38
-rw-r--r--src/test/ui/proc-macro/auxiliary/test-macros.rs180
-rw-r--r--src/test/ui/proc-macro/auxiliary/three-equals.rs49
-rw-r--r--src/test/ui/proc-macro/auxiliary/weird-hygiene.rs48
-rw-r--r--src/test/ui/proc-macro/bang-macro.rs9
-rw-r--r--src/test/ui/proc-macro/break-token-spans.rs16
-rw-r--r--src/test/ui/proc-macro/break-token-spans.stderr21
-rw-r--r--src/test/ui/proc-macro/call-deprecated.rs34
-rw-r--r--src/test/ui/proc-macro/call-deprecated.stderr16
-rw-r--r--src/test/ui/proc-macro/call-site.rs10
-rw-r--r--src/test/ui/proc-macro/capture-macro-rules-invoke.rs57
-rw-r--r--src/test/ui/proc-macro/capture-macro-rules-invoke.stdout324
-rw-r--r--src/test/ui/proc-macro/capture-unglued-token.rs20
-rw-r--r--src/test/ui/proc-macro/capture-unglued-token.stdout28
-rw-r--r--src/test/ui/proc-macro/cfg-eval-fail.rs7
-rw-r--r--src/test/ui/proc-macro/cfg-eval-fail.stderr8
-rw-r--r--src/test/ui/proc-macro/cfg-eval-inner.rs39
-rw-r--r--src/test/ui/proc-macro/cfg-eval-inner.stdout247
-rw-r--r--src/test/ui/proc-macro/cfg-eval.rs37
-rw-r--r--src/test/ui/proc-macro/cfg-eval.stdout150
-rw-r--r--src/test/ui/proc-macro/count_compound_ops.rs9
-rw-r--r--src/test/ui/proc-macro/crate-attrs-multiple.rs14
-rw-r--r--src/test/ui/proc-macro/crate-var.rs61
-rw-r--r--src/test/ui/proc-macro/crt-static.rs24
-rw-r--r--src/test/ui/proc-macro/custom-attr-only-one-derive.rs16
-rw-r--r--src/test/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs15
-rw-r--r--src/test/ui/proc-macro/debug/dump-debug-span-debug.rs46
-rw-r--r--src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr231
-rw-r--r--src/test/ui/proc-macro/debug/dump-debug.rs40
-rw-r--r--src/test/ui/proc-macro/debug/dump-debug.stderr166
-rw-r--r--src/test/ui/proc-macro/define-two.rs18
-rw-r--r--src/test/ui/proc-macro/define-two.stderr14
-rw-r--r--src/test/ui/proc-macro/derive-attr-cfg.rs17
-rw-r--r--src/test/ui/proc-macro/derive-b.rs19
-rw-r--r--src/test/ui/proc-macro/derive-bad.rs11
-rw-r--r--src/test/ui/proc-macro/derive-bad.stderr31
-rw-r--r--src/test/ui/proc-macro/derive-expand-order.rs14
-rw-r--r--src/test/ui/proc-macro/derive-expand-order.stdout5
-rw-r--r--src/test/ui/proc-macro/derive-helper-configured.rs18
-rw-r--r--src/test/ui/proc-macro/derive-helper-legacy-limits.rs21
-rw-r--r--src/test/ui/proc-macro/derive-helper-legacy-limits.stderr8
-rw-r--r--src/test/ui/proc-macro/derive-helper-legacy-spurious.rs12
-rw-r--r--src/test/ui/proc-macro/derive-helper-legacy-spurious.stderr22
-rw-r--r--src/test/ui/proc-macro/derive-helper-shadowed.rs16
-rw-r--r--src/test/ui/proc-macro/derive-helper-shadowing-2.rs16
-rw-r--r--src/test/ui/proc-macro/derive-helper-shadowing.rs56
-rw-r--r--src/test/ui/proc-macro/derive-helper-shadowing.stderr89
-rw-r--r--src/test/ui/proc-macro/derive-helper-vs-legacy.rs12
-rw-r--r--src/test/ui/proc-macro/derive-in-mod.rs13
-rw-r--r--src/test/ui/proc-macro/derive-multiple-with-packed.rs11
-rw-r--r--src/test/ui/proc-macro/derive-same-struct.rs15
-rw-r--r--src/test/ui/proc-macro/derive-same-struct.stdout1
-rw-r--r--src/test/ui/proc-macro/derive-still-gated.rs9
-rw-r--r--src/test/ui/proc-macro/derive-still-gated.stderr8
-rw-r--r--src/test/ui/proc-macro/derive-test.rs22
-rw-r--r--src/test/ui/proc-macro/derive-two-attrs.rs15
-rw-r--r--src/test/ui/proc-macro/derive-union.rs17
-rw-r--r--src/test/ui/proc-macro/disappearing-resolution.rs22
-rw-r--r--src/test/ui/proc-macro/disappearing-resolution.stderr26
-rw-r--r--src/test/ui/proc-macro/doc-comment-preserved.rs24
-rw-r--r--src/test/ui/proc-macro/doc-comment-preserved.stdout54
-rw-r--r--src/test/ui/proc-macro/dollar-crate-issue-101211.rs29
-rw-r--r--src/test/ui/proc-macro/dollar-crate-issue-57089.rs27
-rw-r--r--src/test/ui/proc-macro/dollar-crate-issue-57089.stdout80
-rw-r--r--src/test/ui/proc-macro/dollar-crate-issue-62325.rs26
-rw-r--r--src/test/ui/proc-macro/dollar-crate-issue-62325.stdout110
-rw-r--r--src/test/ui/proc-macro/dollar-crate.rs40
-rw-r--r--src/test/ui/proc-macro/dollar-crate.stdout240
-rw-r--r--src/test/ui/proc-macro/edition-imports-2018.rs24
-rw-r--r--src/test/ui/proc-macro/empty-crate.rs9
-rw-r--r--src/test/ui/proc-macro/empty-where-clause.rs18
-rw-r--r--src/test/ui/proc-macro/empty-where-clause.stderr21
-rw-r--r--src/test/ui/proc-macro/expand-expr.rs132
-rw-r--r--src/test/ui/proc-macro/expand-expr.stderr55
-rw-r--r--src/test/ui/proc-macro/expand-to-derive.rs34
-rw-r--r--src/test/ui/proc-macro/expand-to-derive.stdout104
-rw-r--r--src/test/ui/proc-macro/expand-to-unstable.rs14
-rw-r--r--src/test/ui/proc-macro/expand-to-unstable.stderr12
-rw-r--r--src/test/ui/proc-macro/expand-with-a-macro.rs20
-rw-r--r--src/test/ui/proc-macro/export-macro.rs11
-rw-r--r--src/test/ui/proc-macro/export-macro.stderr8
-rw-r--r--src/test/ui/proc-macro/exports.rs15
-rw-r--r--src/test/ui/proc-macro/exports.stderr26
-rw-r--r--src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.rs37
-rw-r--r--src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout540
-rw-r--r--src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs7
-rw-r--r--src/test/ui/proc-macro/gen-lifetime-token.rs11
-rw-r--r--src/test/ui/proc-macro/gen-macro-rules-hygiene.rs23
-rw-r--r--src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr32
-rw-r--r--src/test/ui/proc-macro/gen-macro-rules.rs13
-rw-r--r--src/test/ui/proc-macro/generate-dollar-ident.rs18
-rw-r--r--src/test/ui/proc-macro/generate-mod.rs33
-rw-r--r--src/test/ui/proc-macro/generate-mod.stderr164
-rw-r--r--src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs13
-rw-r--r--src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr35
-rw-r--r--src/test/ui/proc-macro/helper-attr-blocked-by-import.rs28
-rw-r--r--src/test/ui/proc-macro/hygiene_example.rs16
-rw-r--r--src/test/ui/proc-macro/illegal-proc-macro-derive-use.rs15
-rw-r--r--src/test/ui/proc-macro/illegal-proc-macro-derive-use.stderr14
-rw-r--r--src/test/ui/proc-macro/import.rs8
-rw-r--r--src/test/ui/proc-macro/import.stderr9
-rw-r--r--src/test/ui/proc-macro/inert-attribute-order.rs23
-rw-r--r--src/test/ui/proc-macro/inert-attribute-order.stdout7
-rw-r--r--src/test/ui/proc-macro/inner-attr-non-inline-mod.rs18
-rw-r--r--src/test/ui/proc-macro/inner-attr-non-inline-mod.stderr40
-rw-r--r--src/test/ui/proc-macro/inner-attr-non-inline-mod.stdout76
-rw-r--r--src/test/ui/proc-macro/inner-attrs.rs87
-rw-r--r--src/test/ui/proc-macro/inner-attrs.stderr26
-rw-r--r--src/test/ui/proc-macro/inner-attrs.stdout956
-rw-r--r--src/test/ui/proc-macro/input-interpolated.rs29
-rw-r--r--src/test/ui/proc-macro/input-interpolated.stdout59
-rw-r--r--src/test/ui/proc-macro/invalid-attributes.rs26
-rw-r--r--src/test/ui/proc-macro/invalid-attributes.stderr38
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-1.rs9
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-1.stderr10
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-2.rs9
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-2.stderr10
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-3.rs9
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-3.stderr10
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-4.rs13
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-4.stderr25
-rw-r--r--src/test/ui/proc-macro/is-available.rs15
-rw-r--r--src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs20
-rw-r--r--src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr48
-rw-r--r--src/test/ui/proc-macro/issue-36935.rs14
-rw-r--r--src/test/ui/proc-macro/issue-36935.stderr22
-rw-r--r--src/test/ui/proc-macro/issue-37788.rs9
-rw-r--r--src/test/ui/proc-macro/issue-37788.stderr17
-rw-r--r--src/test/ui/proc-macro/issue-38586.rs9
-rw-r--r--src/test/ui/proc-macro/issue-38586.stderr11
-rw-r--r--src/test/ui/proc-macro/issue-39889.rs12
-rw-r--r--src/test/ui/proc-macro/issue-42708.rs26
-rw-r--r--src/test/ui/proc-macro/issue-50061.rs23
-rw-r--r--src/test/ui/proc-macro/issue-50493.rs13
-rw-r--r--src/test/ui/proc-macro/issue-50493.stderr9
-rw-r--r--src/test/ui/proc-macro/issue-53481.rs22
-rw-r--r--src/test/ui/proc-macro/issue-59191-replace-root-with-fn.rs10
-rw-r--r--src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr4
-rw-r--r--src/test/ui/proc-macro/issue-66286.rs13
-rw-r--r--src/test/ui/proc-macro/issue-66286.stderr14
-rw-r--r--src/test/ui/proc-macro/issue-73933-procedural-masquerade.rs12
-rw-r--r--src/test/ui/proc-macro/issue-73933-procedural-masquerade.stdout21
-rw-r--r--src/test/ui/proc-macro/issue-75734-pp-paren.rs26
-rw-r--r--src/test/ui/proc-macro/issue-75734-pp-paren.stdout134
-rw-r--r--src/test/ui/proc-macro/issue-75801.rs19
-rw-r--r--src/test/ui/proc-macro/issue-75801.stderr12
-rw-r--r--src/test/ui/proc-macro/issue-75930-derive-cfg.rs74
-rw-r--r--src/test/ui/proc-macro/issue-75930-derive-cfg.stderr27
-rw-r--r--src/test/ui/proc-macro/issue-75930-derive-cfg.stdout1904
-rw-r--r--src/test/ui/proc-macro/issue-76182-leading-vert-pat.rs16
-rw-r--r--src/test/ui/proc-macro/issue-76182-leading-vert-pat.stdout62
-rw-r--r--src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs13
-rw-r--r--src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr10
-rw-r--r--src/test/ui/proc-macro/issue-78675-captured-inner-attrs.rs32
-rw-r--r--src/test/ui/proc-macro/issue-78675-captured-inner-attrs.stdout87
-rw-r--r--src/test/ui/proc-macro/issue-79148.rs10
-rw-r--r--src/test/ui/proc-macro/issue-79148.stderr16
-rw-r--r--src/test/ui/proc-macro/issue-79242-slow-retokenize-check.rs34
-rw-r--r--src/test/ui/proc-macro/issue-79825.rs10
-rw-r--r--src/test/ui/proc-macro/issue-80760-empty-stmt.rs26
-rw-r--r--src/test/ui/proc-macro/issue-80760-empty-stmt.stdout14
-rw-r--r--src/test/ui/proc-macro/issue-81007-item-attrs.rs31
-rw-r--r--src/test/ui/proc-macro/issue-81007-item-attrs.stdout99
-rw-r--r--src/test/ui/proc-macro/issue-81543-item-parse-err.rs14
-rw-r--r--src/test/ui/proc-macro/issue-81543-item-parse-err.stderr8
-rw-r--r--src/test/ui/proc-macro/issue-81555.rs15
-rw-r--r--src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.rs10
-rw-r--r--src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr8
-rw-r--r--src/test/ui/proc-macro/issue-83510.rs11
-rw-r--r--src/test/ui/proc-macro/issue-83510.stderr38
-rw-r--r--src/test/ui/proc-macro/issue-86781-bad-inner-doc.fixed12
-rw-r--r--src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs12
-rw-r--r--src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr17
-rw-r--r--src/test/ui/proc-macro/issue-91800.rs16
-rw-r--r--src/test/ui/proc-macro/issue-91800.stderr56
-rw-r--r--src/test/ui/proc-macro/item-error.rs15
-rw-r--r--src/test/ui/proc-macro/item-error.stderr15
-rw-r--r--src/test/ui/proc-macro/keep-expr-tokens.rs24
-rw-r--r--src/test/ui/proc-macro/keep-expr-tokens.stderr15
-rw-r--r--src/test/ui/proc-macro/keep-expr-tokens.stdout46
-rw-r--r--src/test/ui/proc-macro/lifetimes-rpass.rs26
-rw-r--r--src/test/ui/proc-macro/lifetimes.rs9
-rw-r--r--src/test/ui/proc-macro/lifetimes.stderr13
-rw-r--r--src/test/ui/proc-macro/lints_in_proc_macros.rs14
-rw-r--r--src/test/ui/proc-macro/lints_in_proc_macros.stderr11
-rw-r--r--src/test/ui/proc-macro/load-panic-backtrace.rs15
-rw-r--r--src/test/ui/proc-macro/load-panic-backtrace.stderr11
-rw-r--r--src/test/ui/proc-macro/load-panic.rs11
-rw-r--r--src/test/ui/proc-macro/load-panic.stderr10
-rw-r--r--src/test/ui/proc-macro/load-two.rs23
-rw-r--r--src/test/ui/proc-macro/macro-brackets.rs14
-rw-r--r--src/test/ui/proc-macro/macro-brackets.stderr14
-rw-r--r--src/test/ui/proc-macro/macro-crate-multi-decorator.rs41
-rw-r--r--src/test/ui/proc-macro/macro-namespace-reserved-2.rs57
-rw-r--r--src/test/ui/proc-macro/macro-namespace-reserved-2.stderr132
-rw-r--r--src/test/ui/proc-macro/macro-namespace-reserved.rs38
-rw-r--r--src/test/ui/proc-macro/macro-namespace-reserved.stderr47
-rw-r--r--src/test/ui/proc-macro/macro-quote-cond.rs46
-rw-r--r--src/test/ui/proc-macro/macro-rules-derive-cfg.rs31
-rw-r--r--src/test/ui/proc-macro/macro-rules-derive-cfg.stdout171
-rw-r--r--src/test/ui/proc-macro/macro-rules-derive.rs19
-rw-r--r--src/test/ui/proc-macro/macro-rules-derive.stderr14
-rw-r--r--src/test/ui/proc-macro/macro-use-attr.rs12
-rw-r--r--src/test/ui/proc-macro/macro-use-bang.rs9
-rw-r--r--src/test/ui/proc-macro/macros-in-extern-derive.rs6
-rw-r--r--src/test/ui/proc-macro/macros-in-extern-derive.stderr11
-rw-r--r--src/test/ui/proc-macro/macros-in-extern.rs24
-rw-r--r--src/test/ui/proc-macro/macros-in-type.rs11
-rw-r--r--src/test/ui/proc-macro/meta-delim.rs12
-rw-r--r--src/test/ui/proc-macro/meta-macro-hygiene.rs30
-rw-r--r--src/test/ui/proc-macro/meta-macro-hygiene.stdout69
-rw-r--r--src/test/ui/proc-macro/meta-macro.rs14
-rw-r--r--src/test/ui/proc-macro/meta-macro.stdout3
-rw-r--r--src/test/ui/proc-macro/mixed-site-span.rs24
-rw-r--r--src/test/ui/proc-macro/mixed-site-span.stderr34
-rw-r--r--src/test/ui/proc-macro/modify-ast.rs26
-rw-r--r--src/test/ui/proc-macro/module.rs1
-rw-r--r--src/test/ui/proc-macro/module_with_attrs.rs4
-rw-r--r--src/test/ui/proc-macro/multispan.rs25
-rw-r--r--src/test/ui/proc-macro/multispan.stderr93
-rw-r--r--src/test/ui/proc-macro/negative-token.rs11
-rw-r--r--src/test/ui/proc-macro/nested-derive-cfg.rs23
-rw-r--r--src/test/ui/proc-macro/nested-derive-cfg.stdout81
-rw-r--r--src/test/ui/proc-macro/nested-item-spans.rs23
-rw-r--r--src/test/ui/proc-macro/nested-item-spans.stderr19
-rw-r--r--src/test/ui/proc-macro/nested-macro-rules.rs23
-rw-r--r--src/test/ui/proc-macro/nested-macro-rules.stdout46
-rw-r--r--src/test/ui/proc-macro/nested-nonterminal-tokens.rs26
-rw-r--r--src/test/ui/proc-macro/nested-nonterminal-tokens.stdout60
-rw-r--r--src/test/ui/proc-macro/no-macro-use-attr.rs10
-rw-r--r--src/test/ui/proc-macro/no-macro-use-attr.stderr20
-rw-r--r--src/test/ui/proc-macro/no-missing-docs.rs16
-rw-r--r--src/test/ui/proc-macro/nodelim-groups.rs22
-rw-r--r--src/test/ui/proc-macro/nodelim-groups.stdout167
-rw-r--r--src/test/ui/proc-macro/non-root.rs15
-rw-r--r--src/test/ui/proc-macro/non-root.stderr8
-rw-r--r--src/test/ui/proc-macro/nonterminal-expansion.rs37
-rw-r--r--src/test/ui/proc-macro/nonterminal-expansion.stdout42
-rw-r--r--src/test/ui/proc-macro/nonterminal-recollect-attr.rs21
-rw-r--r--src/test/ui/proc-macro/nonterminal-recollect-attr.stdout66
-rw-r--r--src/test/ui/proc-macro/nonterminal-token-hygiene.rs34
-rw-r--r--src/test/ui/proc-macro/nonterminal-token-hygiene.stdout92
-rw-r--r--src/test/ui/proc-macro/not-joint.rs24
-rw-r--r--src/test/ui/proc-macro/out-of-line-mod.rs13
-rw-r--r--src/test/ui/proc-macro/outer/inner.rs1
-rw-r--r--src/test/ui/proc-macro/parent-source-spans.rs53
-rw-r--r--src/test/ui/proc-macro/parent-source-spans.stderr189
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack-hide.rs12
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack-hide.stdout21
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack-show.rs17
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack-show.stderr179
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack-show.stdout44
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs14
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs14
-rw-r--r--src/test/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs14
-rw-r--r--src/test/ui/proc-macro/pretty-print-tts.rs20
-rw-r--r--src/test/ui/proc-macro/pretty-print-tts.stdout102
-rw-r--r--src/test/ui/proc-macro/proc-macro-attributes.rs22
-rw-r--r--src/test/ui/proc-macro/proc-macro-attributes.stderr130
-rw-r--r--src/test/ui/proc-macro/proc-macro-deprecated-attr.rs16
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates.rs53
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates.stderr91
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates2.rs24
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates2.stderr14
-rw-r--r--src/test/ui/proc-macro/pub-at-crate-root.rs22
-rw-r--r--src/test/ui/proc-macro/pub-at-crate-root.stderr20
-rw-r--r--src/test/ui/proc-macro/quote-debug.rs18
-rw-r--r--src/test/ui/proc-macro/quote-debug.stdout47
-rw-r--r--src/test/ui/proc-macro/raw-ident.rs16
-rw-r--r--src/test/ui/proc-macro/raw-ident.stderr10
-rw-r--r--src/test/ui/proc-macro/reserved-macro-names.rs19
-rw-r--r--src/test/ui/proc-macro/reserved-macro-names.stderr14
-rw-r--r--src/test/ui/proc-macro/resolve-error.rs62
-rw-r--r--src/test/ui/proc-macro/resolve-error.stderr132
-rw-r--r--src/test/ui/proc-macro/resolved-located-at.rs10
-rw-r--r--src/test/ui/proc-macro/resolved-located-at.stderr21
-rw-r--r--src/test/ui/proc-macro/shadow.rs8
-rw-r--r--src/test/ui/proc-macro/shadow.stderr14
-rw-r--r--src/test/ui/proc-macro/signature.rs13
-rw-r--r--src/test/ui/proc-macro/signature.stderr23
-rw-r--r--src/test/ui/proc-macro/smoke.rs20
-rw-r--r--src/test/ui/proc-macro/span-absolute-posititions.rs24
-rw-r--r--src/test/ui/proc-macro/span-absolute-posititions.stderr14
-rw-r--r--src/test/ui/proc-macro/span-api-tests.rs61
-rw-r--r--src/test/ui/proc-macro/span-from-proc-macro.rs17
-rw-r--r--src/test/ui/proc-macro/span-from-proc-macro.stderr62
-rw-r--r--src/test/ui/proc-macro/span-preservation.rs57
-rw-r--r--src/test/ui/proc-macro/span-preservation.stderr72
-rw-r--r--src/test/ui/proc-macro/struct-field-macro.rs18
-rw-r--r--src/test/ui/proc-macro/subspan.rs26
-rw-r--r--src/test/ui/proc-macro/subspan.stderr106
-rw-r--r--src/test/ui/proc-macro/test.rs12
-rw-r--r--src/test/ui/proc-macro/three-equals.rs25
-rw-r--r--src/test/ui/proc-macro/three-equals.stderr49
-rw-r--r--src/test/ui/proc-macro/trailing-plus.rs14
-rw-r--r--src/test/ui/proc-macro/trailing-plus.stdout57
-rw-r--r--src/test/ui/proc-macro/trait-fn-args-2015.rs16
-rw-r--r--src/test/ui/proc-macro/two-crate-types-1.rs7
-rw-r--r--src/test/ui/proc-macro/two-crate-types-1.stderr4
-rw-r--r--src/test/ui/proc-macro/two-crate-types-2.rs3
-rw-r--r--src/test/ui/proc-macro/two-crate-types-2.stderr4
-rw-r--r--src/test/ui/proc-macro/unsafe-foreign-mod.rs14
-rw-r--r--src/test/ui/proc-macro/unsafe-mod.rs13
-rw-r--r--src/test/ui/proc-macro/visibility-path.rs25
-rw-r--r--src/test/ui/proc-macro/visibility-path.stderr14
-rw-r--r--src/test/ui/proc-macro/weird-braces.rs23
-rw-r--r--src/test/ui/proc-macro/weird-braces.stdout524
-rw-r--r--src/test/ui/proc-macro/weird-hygiene.rs46
-rw-r--r--src/test/ui/proc-macro/weird-hygiene.stderr25
444 files changed, 0 insertions, 19048 deletions
diff --git a/src/test/ui/proc-macro/add-impl.rs b/src/test/ui/proc-macro/add-impl.rs
deleted file mode 100644
index ff2897a5e..000000000
--- a/src/test/ui/proc-macro/add-impl.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// run-pass
-// aux-build:add-impl.rs
-
-#[macro_use]
-extern crate add_impl;
-
-#[derive(AddImpl)]
-struct B;
-
-fn main() {
- B.foo();
- foo();
- bar::foo();
-}
diff --git a/src/test/ui/proc-macro/allowed-attr-stmt-expr.rs b/src/test/ui/proc-macro/allowed-attr-stmt-expr.rs
deleted file mode 100644
index 25243aeef..000000000
--- a/src/test/ui/proc-macro/allowed-attr-stmt-expr.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-// aux-build:attr-stmt-expr.rs
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-// check-pass
-
-#![feature(proc_macro_hygiene)]
-#![feature(stmt_expr_attributes)]
-#![feature(rustc_attrs)]
-#![allow(dead_code)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate attr_stmt_expr;
-extern crate test_macros;
-use attr_stmt_expr::{expect_let, expect_my_macro_stmt, expect_expr, expect_my_macro_expr};
-use test_macros::print_attr;
-
-// We don't use `std::println` so that we avoid loading hygiene
-// information from libstd, which would affect the SyntaxContext ids
-macro_rules! my_macro {
- ($($tt:tt)*) => { () }
-}
-
-
-fn print_str(string: &'static str) {
- // macros are handled a bit differently
- #[expect_my_macro_expr]
- my_macro!("{}", string)
-}
-
-macro_rules! make_stmt {
- ($stmt:stmt) => {
- #[print_attr]
- #[rustc_dummy]
- $stmt; // This semicolon is *not* passed to the macro,
- // since `$stmt` is already a statement.
- }
-}
-
-macro_rules! second_make_stmt {
- ($stmt:stmt) => {
- make_stmt!($stmt);
- }
-}
-
-// The macro will see a semicolon here
-#[print_attr]
-struct ItemWithSemi;
-
-
-fn main() {
- make_stmt!(struct Foo {});
-
- #[print_attr]
- #[expect_let]
- let string = "Hello, world!";
-
- #[print_attr]
- #[expect_my_macro_stmt]
- my_macro!("{}", string);
-
- #[print_attr]
- second_make_stmt!(#[allow(dead_code)] struct Bar {});
-
- #[print_attr]
- #[rustc_dummy]
- struct Other {};
-
- // The macro also sees a semicolon,
- // for consistency with the `ItemWithSemi` case above.
- #[print_attr]
- #[rustc_dummy]
- struct NonBracedStruct;
-
- #[expect_expr]
- print_str("string")
-}
diff --git a/src/test/ui/proc-macro/allowed-attr-stmt-expr.stdout b/src/test/ui/proc-macro/allowed-attr-stmt-expr.stdout
deleted file mode 100644
index 091862de3..000000000
--- a/src/test/ui/proc-macro/allowed-attr-stmt-expr.stdout
+++ /dev/null
@@ -1,321 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): struct ItemWithSemi ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/allowed-attr-stmt-expr.rs:49:1: 49:7 (#0),
- },
- Ident {
- ident: "ItemWithSemi",
- span: $DIR/allowed-attr-stmt-expr.rs:49:8: 49:20 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:49:20: 49:21 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct Foo {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:35:9: 35:10 (#11),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/allowed-attr-stmt-expr.rs:35:11: 35:22 (#11),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:35:10: 35:23 (#11),
- },
- Ident {
- ident: "struct",
- span: $DIR/allowed-attr-stmt-expr.rs:53:16: 53:22 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/allowed-attr-stmt-expr.rs:53:23: 53:26 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/allowed-attr-stmt-expr.rs:53:27: 53:29 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[expect_let] let string = "Hello, world!" ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:56:5: 56:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "expect_let",
- span: $DIR/allowed-attr-stmt-expr.rs:56:7: 56:17 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:56:6: 56:18 (#0),
- },
- Ident {
- ident: "let",
- span: $DIR/allowed-attr-stmt-expr.rs:57:5: 57:8 (#0),
- },
- Ident {
- ident: "string",
- span: $DIR/allowed-attr-stmt-expr.rs:57:9: 57:15 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:57:16: 57:17 (#0),
- },
- Literal {
- kind: Str,
- symbol: "Hello, world!",
- suffix: None,
- span: $DIR/allowed-attr-stmt-expr.rs:57:18: 57:33 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:57:33: 57:34 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:60:5: 60:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "expect_my_macro_stmt",
- span: $DIR/allowed-attr-stmt-expr.rs:60:7: 60:27 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:60:6: 60:28 (#0),
- },
- Ident {
- ident: "my_macro",
- span: $DIR/allowed-attr-stmt-expr.rs:61:5: 61:13 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:61:13: 61:14 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Str,
- symbol: "{}",
- suffix: None,
- span: $DIR/allowed-attr-stmt-expr.rs:61:15: 61:19 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:61:19: 61:20 (#0),
- },
- Ident {
- ident: "string",
- span: $DIR/allowed-attr-stmt-expr.rs:61:21: 61:27 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:61:14: 61:28 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:61:28: 61:29 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {}) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "second_make_stmt",
- span: $DIR/allowed-attr-stmt-expr.rs:64:5: 64:21 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:64:21: 64:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:64:23: 64:24 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/allowed-attr-stmt-expr.rs:64:25: 64:30 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "dead_code",
- span: $DIR/allowed-attr-stmt-expr.rs:64:31: 64:40 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:64:30: 64:41 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:64:24: 64:42 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/allowed-attr-stmt-expr.rs:64:43: 64:49 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/allowed-attr-stmt-expr.rs:64:50: 64:53 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/allowed-attr-stmt-expr.rs:64:54: 64:56 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:64:22: 64:57 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:64:57: 64:58 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] #[allow(dead_code)] struct Bar {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:35:9: 35:10 (#32),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/allowed-attr-stmt-expr.rs:35:11: 35:22 (#32),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:35:10: 35:23 (#32),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:64:23: 64:24 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/allowed-attr-stmt-expr.rs:64:25: 64:30 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "dead_code",
- span: $DIR/allowed-attr-stmt-expr.rs:64:31: 64:40 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:64:30: 64:41 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:64:24: 64:42 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/allowed-attr-stmt-expr.rs:64:43: 64:49 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/allowed-attr-stmt-expr.rs:64:50: 64:53 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/allowed-attr-stmt-expr.rs:64:54: 64:56 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct Other {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:67:5: 67:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/allowed-attr-stmt-expr.rs:67:7: 67:18 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:67:6: 67:19 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/allowed-attr-stmt-expr.rs:68:5: 68:11 (#0),
- },
- Ident {
- ident: "Other",
- span: $DIR/allowed-attr-stmt-expr.rs:68:12: 68:17 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/allowed-attr-stmt-expr.rs:68:18: 68:20 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct NonBracedStruct ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:73:5: 73:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/allowed-attr-stmt-expr.rs:73:7: 73:18 (#0),
- },
- ],
- span: $DIR/allowed-attr-stmt-expr.rs:73:6: 73:19 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/allowed-attr-stmt-expr.rs:74:5: 74:11 (#0),
- },
- Ident {
- ident: "NonBracedStruct",
- span: $DIR/allowed-attr-stmt-expr.rs:74:12: 74:27 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/allowed-attr-stmt-expr.rs:74:27: 74:28 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.rs b/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.rs
deleted file mode 100644
index 6a47e50f6..000000000
--- a/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// aux-build:builtin-attrs.rs
-// compile-flags:--test
-
-#![feature(decl_macro, test)]
-
-extern crate test;
-extern crate builtin_attrs;
-use builtin_attrs::{test, bench};
-
-#[test] // OK, shadowed
-fn test() {}
-
-#[bench] // OK, shadowed
-fn bench(b: &mut test::Bencher) {}
-
-fn not_main() {
- Test;
- Bench;
- NonExistent; //~ ERROR cannot find value `NonExistent` in this scope
-}
diff --git a/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr b/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
deleted file mode 100644
index 316eb636b..000000000
--- a/src/test/ui/proc-macro/ambiguous-builtin-attrs-test.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0425]: cannot find value `NonExistent` in this scope
- --> $DIR/ambiguous-builtin-attrs-test.rs:19:5
- |
-LL | NonExistent;
- | ^^^^^^^^^^^ not found in this scope
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/proc-macro/ambiguous-builtin-attrs.rs b/src/test/ui/proc-macro/ambiguous-builtin-attrs.rs
deleted file mode 100644
index 695ea69c8..000000000
--- a/src/test/ui/proc-macro/ambiguous-builtin-attrs.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// edition:2018
-// aux-build:builtin-attrs.rs
-#![feature(decl_macro)] //~ ERROR `feature` is ambiguous
-
-extern crate builtin_attrs;
-use builtin_attrs::*;
-use builtin_attrs::{bench, test};
-
-#[repr(C)] //~ ERROR `repr` is ambiguous
-struct S;
-#[cfg_attr(all(), repr(C))] //~ ERROR `repr` is ambiguous
-struct SCond;
-
-#[test] // OK, shadowed
-fn test() {}
-
-#[bench] // OK, shadowed
-fn bench() {}
-
-fn non_macro_expanded_location<#[repr(C)] T>() {
- //~^ ERROR `repr` is ambiguous
- //~| ERROR attribute should be applied to a struct, enum, or union
- match 0u8 {
- #[repr(C)]
- //~^ ERROR `repr` is ambiguous
- //~| ERROR attribute should be applied to a struct, enum, or union
- _ => {}
- }
-}
-
-fn main() {
- Test;
- Bench;
- NonExistent; //~ ERROR cannot find value `NonExistent` in this scope
-}
-
-use deny as allow;
-#[allow(unused)] //~ ERROR `allow` is ambiguous
-fn builtin_renamed() {}
diff --git a/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr b/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr
deleted file mode 100644
index 0f4ddc065..000000000
--- a/src/test/ui/proc-macro/ambiguous-builtin-attrs.stderr
+++ /dev/null
@@ -1,115 +0,0 @@
-error[E0425]: cannot find value `NonExistent` in this scope
- --> $DIR/ambiguous-builtin-attrs.rs:34:5
- |
-LL | NonExistent;
- | ^^^^^^^^^^^ not found in this scope
-
-error[E0659]: `repr` is ambiguous
- --> $DIR/ambiguous-builtin-attrs.rs:9:3
- |
-LL | #[repr(C)]
- | ^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a builtin attribute
- = note: `repr` could refer to a built-in attribute
-note: `repr` could also refer to the attribute macro imported here
- --> $DIR/ambiguous-builtin-attrs.rs:6:5
- |
-LL | use builtin_attrs::*;
- | ^^^^^^^^^^^^^^^^
- = help: use `crate::repr` to refer to this attribute macro unambiguously
-
-error[E0659]: `repr` is ambiguous
- --> $DIR/ambiguous-builtin-attrs.rs:11:19
- |
-LL | #[cfg_attr(all(), repr(C))]
- | ^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a builtin attribute
- = note: `repr` could refer to a built-in attribute
-note: `repr` could also refer to the attribute macro imported here
- --> $DIR/ambiguous-builtin-attrs.rs:6:5
- |
-LL | use builtin_attrs::*;
- | ^^^^^^^^^^^^^^^^
- = help: use `crate::repr` to refer to this attribute macro unambiguously
-
-error[E0659]: `repr` is ambiguous
- --> $DIR/ambiguous-builtin-attrs.rs:20:34
- |
-LL | fn non_macro_expanded_location<#[repr(C)] T>() {
- | ^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a builtin attribute
- = note: `repr` could refer to a built-in attribute
-note: `repr` could also refer to the attribute macro imported here
- --> $DIR/ambiguous-builtin-attrs.rs:6:5
- |
-LL | use builtin_attrs::*;
- | ^^^^^^^^^^^^^^^^
- = help: use `crate::repr` to refer to this attribute macro unambiguously
-
-error[E0659]: `repr` is ambiguous
- --> $DIR/ambiguous-builtin-attrs.rs:24:11
- |
-LL | #[repr(C)]
- | ^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a builtin attribute
- = note: `repr` could refer to a built-in attribute
-note: `repr` could also refer to the attribute macro imported here
- --> $DIR/ambiguous-builtin-attrs.rs:6:5
- |
-LL | use builtin_attrs::*;
- | ^^^^^^^^^^^^^^^^
- = help: use `crate::repr` to refer to this attribute macro unambiguously
-
-error[E0659]: `allow` is ambiguous
- --> $DIR/ambiguous-builtin-attrs.rs:38:3
- |
-LL | #[allow(unused)]
- | ^^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a builtin attribute
- = note: `allow` could refer to a built-in attribute
-note: `allow` could also refer to the built-in attribute imported here
- --> $DIR/ambiguous-builtin-attrs.rs:37:5
- |
-LL | use deny as allow;
- | ^^^^^^^^^^^^^
- = help: use `crate::allow` to refer to this built-in attribute unambiguously
-
-error[E0659]: `feature` is ambiguous
- --> $DIR/ambiguous-builtin-attrs.rs:3:4
- |
-LL | #![feature(decl_macro)]
- | ^^^^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a builtin attribute
- = note: `feature` could refer to a built-in attribute
-note: `feature` could also refer to the attribute macro imported here
- --> $DIR/ambiguous-builtin-attrs.rs:6:5
- |
-LL | use builtin_attrs::*;
- | ^^^^^^^^^^^^^^^^
- = help: use `crate::feature` to refer to this attribute macro unambiguously
-
-error[E0517]: attribute should be applied to a struct, enum, or union
- --> $DIR/ambiguous-builtin-attrs.rs:20:39
- |
-LL | fn non_macro_expanded_location<#[repr(C)] T>() {
- | ^ - not a struct, enum, or union
-
-error[E0517]: attribute should be applied to a struct, enum, or union
- --> $DIR/ambiguous-builtin-attrs.rs:24:16
- |
-LL | #[repr(C)]
- | ^
-...
-LL | _ => {}
- | ------- not a struct, enum, or union
-
-error: aborting due to 9 previous errors
-
-Some errors have detailed explanations: E0425, E0517, E0659.
-For more information about an error, try `rustc --explain E0425`.
diff --git a/src/test/ui/proc-macro/amputate-span.fixed b/src/test/ui/proc-macro/amputate-span.fixed
deleted file mode 100644
index 1afc3501a..000000000
--- a/src/test/ui/proc-macro/amputate-span.fixed
+++ /dev/null
@@ -1,69 +0,0 @@
-// aux-build:amputate-span.rs
-// run-rustfix
-// edition:2018
-// compile-flags: --extern amputate_span
-
-// This test has been crafted to ensure the following things:
-//
-// 1. There's a resolution error that prompts the compiler to suggest
-// adding a `use` item.
-//
-// 2. There are no `use` or `extern crate` items in the source
-// code. In fact, there is only one item, the `fn main`
-// declaration.
-//
-// 3. The single `fn main` declaration has an attribute attached to it
-// that just deletes the first token from the given item.
-//
-// You need all of these conditions to hold in order to replicate the
-// scenario that yielded issue 87613, where the compiler's suggestion
-// looks like:
-//
-// ```
-// help: consider importing this struct
-// |
-// 47 | hey */ async use std::process::Command;
-// | ++++++++++++++++++++++++++
-// ```
-//
-// The first condition is necessary to force the compiler issue a
-// suggestion. The second condition is necessary to force the
-// suggestion to be issued at a span associated with the sole
-// `fn`-item of this crate. The third condition is necessary in order
-// to yield the weird state where the associated span of the `fn`-item
-// does not actually cover all of the original source code of the
-// `fn`-item (which is why we are calling it an "amputated" span
-// here).
-//
-// Note that satisfying conditions 2 and 3 requires the use of the
-// `--extern` compile flag.
-//
-// You might ask yourself: What code would do such a thing? The
-// answer is: the #[tokio::main] attribute does *exactly* this (as
-// well as injecting some other code into the `fn main` that it
-// constructs).
-
-use std::process::Command;
-
-#[amputate_span::drop_first_token]
-/* what the
-hey */ async fn main() {
- Command::new("git"); //~ ERROR [E0433]
-}
-
-// (The /* ... */ comment in the above is not part of the original
-// bug. It is just meant to illustrate one particular facet of the
-// original non-ideal behavior, where we were transcribing the
-// trailing comment as part of the emitted suggestion, for better or
-// for worse.)
-
-#[allow(dead_code)]
-mod inner {
- use std::process::Command;
-
-#[amputate_span::drop_first_token]
- /* another interesting
- case */ async fn foo() {
- Command::new("git"); //~ ERROR [E0433]
- }
-}
diff --git a/src/test/ui/proc-macro/amputate-span.rs b/src/test/ui/proc-macro/amputate-span.rs
deleted file mode 100644
index 894a06dd5..000000000
--- a/src/test/ui/proc-macro/amputate-span.rs
+++ /dev/null
@@ -1,65 +0,0 @@
-// aux-build:amputate-span.rs
-// run-rustfix
-// edition:2018
-// compile-flags: --extern amputate_span
-
-// This test has been crafted to ensure the following things:
-//
-// 1. There's a resolution error that prompts the compiler to suggest
-// adding a `use` item.
-//
-// 2. There are no `use` or `extern crate` items in the source
-// code. In fact, there is only one item, the `fn main`
-// declaration.
-//
-// 3. The single `fn main` declaration has an attribute attached to it
-// that just deletes the first token from the given item.
-//
-// You need all of these conditions to hold in order to replicate the
-// scenario that yielded issue 87613, where the compiler's suggestion
-// looks like:
-//
-// ```
-// help: consider importing this struct
-// |
-// 47 | hey */ async use std::process::Command;
-// | ++++++++++++++++++++++++++
-// ```
-//
-// The first condition is necessary to force the compiler issue a
-// suggestion. The second condition is necessary to force the
-// suggestion to be issued at a span associated with the sole
-// `fn`-item of this crate. The third condition is necessary in order
-// to yield the weird state where the associated span of the `fn`-item
-// does not actually cover all of the original source code of the
-// `fn`-item (which is why we are calling it an "amputated" span
-// here).
-//
-// Note that satisfying conditions 2 and 3 requires the use of the
-// `--extern` compile flag.
-//
-// You might ask yourself: What code would do such a thing? The
-// answer is: the #[tokio::main] attribute does *exactly* this (as
-// well as injecting some other code into the `fn main` that it
-// constructs).
-
-#[amputate_span::drop_first_token]
-/* what the
-hey */ async fn main() {
- Command::new("git"); //~ ERROR [E0433]
-}
-
-// (The /* ... */ comment in the above is not part of the original
-// bug. It is just meant to illustrate one particular facet of the
-// original non-ideal behavior, where we were transcribing the
-// trailing comment as part of the emitted suggestion, for better or
-// for worse.)
-
-#[allow(dead_code)]
-mod inner {
- #[amputate_span::drop_first_token]
- /* another interesting
- case */ async fn foo() {
- Command::new("git"); //~ ERROR [E0433]
- }
-}
diff --git a/src/test/ui/proc-macro/amputate-span.stderr b/src/test/ui/proc-macro/amputate-span.stderr
deleted file mode 100644
index ab4670411..000000000
--- a/src/test/ui/proc-macro/amputate-span.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error[E0433]: failed to resolve: use of undeclared type `Command`
- --> $DIR/amputate-span.rs:49:5
- |
-LL | Command::new("git");
- | ^^^^^^^ use of undeclared type `Command`
- |
-help: consider importing this struct
- |
-LL | use std::process::Command;
- |
-
-error[E0433]: failed to resolve: use of undeclared type `Command`
- --> $DIR/amputate-span.rs:63:9
- |
-LL | Command::new("git");
- | ^^^^^^^ use of undeclared type `Command`
- |
-help: consider importing this struct
- |
-LL | use std::process::Command;
- |
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0433`.
diff --git a/src/test/ui/proc-macro/append-impl.rs b/src/test/ui/proc-macro/append-impl.rs
deleted file mode 100644
index a49384013..000000000
--- a/src/test/ui/proc-macro/append-impl.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// run-pass
-// aux-build:append-impl.rs
-
-#![allow(warnings)]
-
-#[macro_use]
-extern crate append_impl;
-
-trait Append {
- fn foo(&self);
-}
-
-#[derive(PartialEq,
- Append,
- Eq)]
-struct A {
- inner: u32,
-}
-
-fn main() {
- A { inner: 3 }.foo();
-}
diff --git a/src/test/ui/proc-macro/attr-args.rs b/src/test/ui/proc-macro/attr-args.rs
deleted file mode 100644
index 764f507ab..000000000
--- a/src/test/ui/proc-macro/attr-args.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// run-pass
-// aux-build:attr-args.rs
-
-#![allow(warnings)]
-
-extern crate attr_args;
-use attr_args::{attr_with_args, identity};
-
-#[attr_with_args(text = "Hello, world!")]
-fn foo() {}
-
-#[identity(fn main() { assert_eq!(foo(), "Hello, world!"); })]
-struct Dummy;
diff --git a/src/test/ui/proc-macro/attr-cfg.rs b/src/test/ui/proc-macro/attr-cfg.rs
deleted file mode 100644
index 2aed9e2e8..000000000
--- a/src/test/ui/proc-macro/attr-cfg.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// run-pass
-// aux-build:attr-cfg.rs
-// revisions: foo bar
-
-extern crate attr_cfg;
-use attr_cfg::attr_cfg;
-
-#[attr_cfg]
-fn outer() -> u8 {
- #[cfg(foo)]
- fn inner() -> u8 { 1 }
-
- #[cfg(bar)]
- fn inner() -> u8 { 2 }
-
- inner()
-}
-
-#[cfg(foo)]
-fn main() {
- assert_eq!(outer(), 1);
-}
-
-#[cfg(bar)]
-fn main() {
- assert_eq!(outer(), 2);
-}
diff --git a/src/test/ui/proc-macro/attr-complex-fn.rs b/src/test/ui/proc-macro/attr-complex-fn.rs
deleted file mode 100644
index 47734c94f..000000000
--- a/src/test/ui/proc-macro/attr-complex-fn.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug --error-format human
-// aux-build:test-macros.rs
-
-#![feature(stmt_expr_attributes)]
-#![feature(custom_inner_attributes)]
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-trait MyTrait<T> {}
-struct MyStruct<const N: bool>;
-
-#[print_attr]
-fn foo<T: MyTrait<MyStruct<{ true }>>>() {}
-
-impl<T> MyTrait<T> for MyStruct<{true}> {
- #![print_attr]
- #![rustc_dummy]
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/attr-complex-fn.stdout b/src/test/ui/proc-macro/attr-complex-fn.stdout
deleted file mode 100644
index b12eb587f..000000000
--- a/src/test/ui/proc-macro/attr-complex-fn.stdout
+++ /dev/null
@@ -1,171 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): fn foo < T : MyTrait < MyStruct < { true } >> > () {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/attr-complex-fn.rs:19:1: 19:3 (#0),
- },
- Ident {
- ident: "foo",
- span: $DIR/attr-complex-fn.rs:19:4: 19:7 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:19:7: 19:8 (#0),
- },
- Ident {
- ident: "T",
- span: $DIR/attr-complex-fn.rs:19:8: 19:9 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:19:9: 19:10 (#0),
- },
- Ident {
- ident: "MyTrait",
- span: $DIR/attr-complex-fn.rs:19:11: 19:18 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:19:18: 19:19 (#0),
- },
- Ident {
- ident: "MyStruct",
- span: $DIR/attr-complex-fn.rs:19:19: 19:27 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:19:27: 19:28 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "true",
- span: $DIR/attr-complex-fn.rs:19:30: 19:34 (#0),
- },
- ],
- span: $DIR/attr-complex-fn.rs:19:28: 19:36 (#0),
- },
- Punct {
- ch: '>',
- spacing: Joint,
- span: $DIR/attr-complex-fn.rs:19:36: 19:37 (#0),
- },
- Punct {
- ch: '>',
- spacing: Joint,
- span: $DIR/attr-complex-fn.rs:19:37: 19:38 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:19:38: 19:39 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/attr-complex-fn.rs:19:39: 19:41 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/attr-complex-fn.rs:19:42: 19:44 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): impl < T > MyTrait < T > for MyStruct < { true } > { #! [rustc_dummy] }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "impl",
- span: $DIR/attr-complex-fn.rs:21:1: 21:5 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:21:5: 21:6 (#0),
- },
- Ident {
- ident: "T",
- span: $DIR/attr-complex-fn.rs:21:6: 21:7 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:21:7: 21:8 (#0),
- },
- Ident {
- ident: "MyTrait",
- span: $DIR/attr-complex-fn.rs:21:9: 21:16 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:21:16: 21:17 (#0),
- },
- Ident {
- ident: "T",
- span: $DIR/attr-complex-fn.rs:21:17: 21:18 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:21:18: 21:19 (#0),
- },
- Ident {
- ident: "for",
- span: $DIR/attr-complex-fn.rs:21:20: 21:23 (#0),
- },
- Ident {
- ident: "MyStruct",
- span: $DIR/attr-complex-fn.rs:21:24: 21:32 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:21:32: 21:33 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "true",
- span: $DIR/attr-complex-fn.rs:21:34: 21:38 (#0),
- },
- ],
- span: $DIR/attr-complex-fn.rs:21:33: 21:39 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:21:39: 21:40 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/attr-complex-fn.rs:23:5: 23:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/attr-complex-fn.rs:23:6: 23:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/attr-complex-fn.rs:23:8: 23:19 (#0),
- },
- ],
- span: $DIR/attr-complex-fn.rs:23:7: 23:20 (#0),
- },
- ],
- span: $DIR/attr-complex-fn.rs:21:41: 24:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/attr-invalid-exprs.rs b/src/test/ui/proc-macro/attr-invalid-exprs.rs
deleted file mode 100644
index 9dcffc340..000000000
--- a/src/test/ui/proc-macro/attr-invalid-exprs.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-//! Attributes producing expressions in invalid locations
-
-// aux-build:attr-stmt-expr.rs
-
-#![feature(proc_macro_hygiene)]
-#![feature(stmt_expr_attributes)]
-
-extern crate attr_stmt_expr;
-use attr_stmt_expr::{duplicate, no_output};
-
-fn main() {
- let _ = #[no_output] "Hello, world!";
- //~^ ERROR expected expression, found end of macro arguments
-
- let _ = #[duplicate] "Hello, world!";
- //~^ ERROR macro expansion ignores token `,` and any following
-
- let _ = {
- #[no_output]
- "Hello, world!"
- };
-
- let _ = {
- #[duplicate]
- //~^ ERROR macro expansion ignores token `,` and any following
- "Hello, world!"
- };
-}
diff --git a/src/test/ui/proc-macro/attr-invalid-exprs.stderr b/src/test/ui/proc-macro/attr-invalid-exprs.stderr
deleted file mode 100644
index bcb54df0e..000000000
--- a/src/test/ui/proc-macro/attr-invalid-exprs.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-error: expected expression, found end of macro arguments
- --> $DIR/attr-invalid-exprs.rs:12:13
- |
-LL | let _ = #[no_output] "Hello, world!";
- | ^^^^^^^^^^^^
-
-error: macro expansion ignores token `,` and any following
- --> $DIR/attr-invalid-exprs.rs:15:13
- |
-LL | let _ = #[duplicate] "Hello, world!";
- | ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
- | |
- | caused by the macro expansion here
- |
- = note: the usage of `duplicate!` is likely invalid in expression context
-
-error: macro expansion ignores token `,` and any following
- --> $DIR/attr-invalid-exprs.rs:24:9
- |
-LL | #[duplicate]
- | ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
- | |
- | caused by the macro expansion here
- |
- = note: the usage of `duplicate!` is likely invalid in expression context
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/proc-macro/attr-on-trait.rs b/src/test/ui/proc-macro/attr-on-trait.rs
deleted file mode 100644
index e0edee630..000000000
--- a/src/test/ui/proc-macro/attr-on-trait.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// run-pass
-// aux-build:attr-on-trait.rs
-
-extern crate attr_on_trait;
-
-use attr_on_trait::foo;
-
-trait Foo {
- #[foo]
- fn foo() {}
-}
-
-impl Foo for i32 {
- fn foo(&self) {}
-}
-
-fn main() {
- 3i32.foo();
-}
diff --git a/src/test/ui/proc-macro/attr-stmt-expr-rpass.rs b/src/test/ui/proc-macro/attr-stmt-expr-rpass.rs
deleted file mode 100644
index 16b8fabfc..000000000
--- a/src/test/ui/proc-macro/attr-stmt-expr-rpass.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// run-pass
-// aux-build:attr-stmt-expr-rpass.rs
-
-#![feature(stmt_expr_attributes, proc_macro_hygiene)]
-
-extern crate attr_stmt_expr_rpass as attr_stmt_expr;
-use attr_stmt_expr::{expect_let, expect_print_stmt, expect_expr, expect_print_expr,
- no_output, noop};
-
-fn print_str(string: &'static str) {
- // macros are handled a bit differently
- #[expect_print_expr]
- println!("{}", string)
-}
-
-fn main() {
- #[expect_let]
- let string = "Hello, world!";
-
- #[expect_print_stmt]
- println!("{}", string);
-
- let _: () = {
- #[no_output]
- "Hello, world!"
- };
-
- let _: &'static str = #[noop] "Hello, world!";
-
- let _: &'static str = {
- #[noop] "Hello, world!"
- };
-
- #[expect_expr]
- print_str("string")
-}
diff --git a/src/test/ui/proc-macro/attr-stmt-expr.rs b/src/test/ui/proc-macro/attr-stmt-expr.rs
deleted file mode 100644
index 0403684cd..000000000
--- a/src/test/ui/proc-macro/attr-stmt-expr.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-// aux-build:attr-stmt-expr.rs
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-
-#![feature(proc_macro_hygiene)]
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-extern crate test_macros;
-extern crate attr_stmt_expr;
-
-use test_macros::print_attr;
-use attr_stmt_expr::{expect_let, expect_my_macro_stmt, expect_expr, expect_my_macro_expr};
-
-// We don't use `std::println` so that we avoid loading hygiene
-// information from libstd, which would affect the SyntaxContext ids
-macro_rules! my_macro {
- ($($tt:tt)*) => { () }
-}
-
-fn print_str(string: &'static str) {
- // macros are handled a bit differently
- #[expect_my_macro_expr]
- //~^ ERROR attributes on expressions are experimental
- //~| HELP add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
- my_macro!("{}", string)
-}
-
-macro_rules! make_stmt {
- ($stmt:stmt) => {
- #[print_attr]
- #[rustc_dummy]
- $stmt
- }
-}
-
-macro_rules! second_make_stmt {
- ($stmt:stmt) => {
- make_stmt!($stmt);
- }
-}
-
-fn main() {
- make_stmt!(struct Foo {});
-
- #[print_attr]
- #[expect_let]
- let string = "Hello, world!";
-
- #[print_attr]
- #[expect_my_macro_stmt]
- my_macro!("{}", string);
-
- #[print_attr]
- second_make_stmt!(#[allow(dead_code)] struct Bar {});
-
- #[print_attr]
- #[rustc_dummy]
- struct Other {}
-
- #[expect_expr]
- //~^ ERROR attributes on expressions are experimental
- //~| HELP add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
- print_str("string")
-}
diff --git a/src/test/ui/proc-macro/attr-stmt-expr.stderr b/src/test/ui/proc-macro/attr-stmt-expr.stderr
deleted file mode 100644
index 56178259d..000000000
--- a/src/test/ui/proc-macro/attr-stmt-expr.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0658]: attributes on expressions are experimental
- --> $DIR/attr-stmt-expr.rs:24:5
- |
-LL | #[expect_my_macro_expr]
- | ^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
- = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
-
-error[E0658]: attributes on expressions are experimental
- --> $DIR/attr-stmt-expr.rs:62:5
- |
-LL | #[expect_expr]
- | ^^^^^^^^^^^^^^
- |
- = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
- = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/proc-macro/attr-stmt-expr.stdout b/src/test/ui/proc-macro/attr-stmt-expr.stdout
deleted file mode 100644
index f9b2305c7..000000000
--- a/src/test/ui/proc-macro/attr-stmt-expr.stdout
+++ /dev/null
@@ -1,274 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct Foo {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#8),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#8),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#8),
- },
- Ident {
- ident: "struct",
- span: $DIR/attr-stmt-expr.rs:45:16: 45:22 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/attr-stmt-expr.rs:45:23: 45:26 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/attr-stmt-expr.rs:45:27: 45:29 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[expect_let] let string = "Hello, world!" ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:48:5: 48:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "expect_let",
- span: $DIR/attr-stmt-expr.rs:48:7: 48:17 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:48:6: 48:18 (#0),
- },
- Ident {
- ident: "let",
- span: $DIR/attr-stmt-expr.rs:49:5: 49:8 (#0),
- },
- Ident {
- ident: "string",
- span: $DIR/attr-stmt-expr.rs:49:9: 49:15 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:49:16: 49:17 (#0),
- },
- Literal {
- kind: Str,
- symbol: "Hello, world!",
- suffix: None,
- span: $DIR/attr-stmt-expr.rs:49:18: 49:33 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:49:33: 49:34 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[expect_my_macro_stmt] my_macro! ("{}", string) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:52:5: 52:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "expect_my_macro_stmt",
- span: $DIR/attr-stmt-expr.rs:52:7: 52:27 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:52:6: 52:28 (#0),
- },
- Ident {
- ident: "my_macro",
- span: $DIR/attr-stmt-expr.rs:53:5: 53:13 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:53:13: 53:14 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Str,
- symbol: "{}",
- suffix: None,
- span: $DIR/attr-stmt-expr.rs:53:15: 53:19 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:53:19: 53:20 (#0),
- },
- Ident {
- ident: "string",
- span: $DIR/attr-stmt-expr.rs:53:21: 53:27 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:53:14: 53:28 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:53:28: 53:29 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): second_make_stmt! (#[allow(dead_code)] struct Bar {}) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "second_make_stmt",
- span: $DIR/attr-stmt-expr.rs:56:5: 56:21 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:56:21: 56:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:56:23: 56:24 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/attr-stmt-expr.rs:56:25: 56:30 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "dead_code",
- span: $DIR/attr-stmt-expr.rs:56:31: 56:40 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:56:30: 56:41 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:56:24: 56:42 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/attr-stmt-expr.rs:56:43: 56:49 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/attr-stmt-expr.rs:56:50: 56:53 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/attr-stmt-expr.rs:56:54: 56:56 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:56:22: 56:57 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:56:57: 56:58 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] #[allow(dead_code)] struct Bar {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:33:9: 33:10 (#29),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/attr-stmt-expr.rs:33:11: 33:22 (#29),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:33:10: 33:23 (#29),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:56:23: 56:24 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/attr-stmt-expr.rs:56:25: 56:30 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "dead_code",
- span: $DIR/attr-stmt-expr.rs:56:31: 56:40 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:56:30: 56:41 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:56:24: 56:42 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/attr-stmt-expr.rs:56:43: 56:49 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/attr-stmt-expr.rs:56:50: 56:53 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/attr-stmt-expr.rs:56:54: 56:56 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] struct Other {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attr-stmt-expr.rs:59:5: 59:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/attr-stmt-expr.rs:59:7: 59:18 (#0),
- },
- ],
- span: $DIR/attr-stmt-expr.rs:59:6: 59:19 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/attr-stmt-expr.rs:60:5: 60:11 (#0),
- },
- Ident {
- ident: "Other",
- span: $DIR/attr-stmt-expr.rs:60:12: 60:17 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/attr-stmt-expr.rs:60:18: 60:20 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/attribute-after-derive.rs b/src/test/ui/proc-macro/attribute-after-derive.rs
deleted file mode 100644
index 0f0f27bff..000000000
--- a/src/test/ui/proc-macro/attribute-after-derive.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Macro attributes are allowed after `#[derive]` and
-// `#[derive]` fully configures the item for following attributes.
-
-// check-pass
-// compile-flags: -Z span-debug
-// aux-build: test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-#[print_attr]
-#[derive(Print)]
-struct AttributeDerive {
- #[cfg(FALSE)]
- field: u8,
-}
-
-#[derive(Print)]
-#[print_attr]
-struct DeriveAttribute {
- #[cfg(FALSE)]
- field: u8,
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/attribute-after-derive.stdout b/src/test/ui/proc-macro/attribute-after-derive.stdout
deleted file mode 100644
index 1b17d6047..000000000
--- a/src/test/ui/proc-macro/attribute-after-derive.stdout
+++ /dev/null
@@ -1,192 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): #[derive(Print)] struct AttributeDerive { #[cfg(FALSE)] field : u8, }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:15:1: 15:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "derive",
- span: $DIR/attribute-after-derive.rs:15:3: 15:9 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "Print",
- span: $DIR/attribute-after-derive.rs:15:10: 15:15 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:15:9: 15:16 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:15:2: 15:17 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/attribute-after-derive.rs:16:1: 16:7 (#0),
- },
- Ident {
- ident: "AttributeDerive",
- span: $DIR/attribute-after-derive.rs:16:8: 16:23 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:17:5: 17:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/attribute-after-derive.rs:17:7: 17:10 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/attribute-after-derive.rs:17:11: 17:16 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:17:10: 17:17 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:17:6: 17:18 (#0),
- },
- Ident {
- ident: "field",
- span: $DIR/attribute-after-derive.rs:18:5: 18:10 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:18:10: 18:11 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/attribute-after-derive.rs:18:12: 18:14 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:18:14: 18:15 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:16:24: 19:2 (#0),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): struct AttributeDerive {}
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/attribute-after-derive.rs:16:1: 16:7 (#0),
- },
- Ident {
- ident: "AttributeDerive",
- span: $DIR/attribute-after-derive.rs:16:8: 16:23 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/attribute-after-derive.rs:16:24: 19:2 (#0),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): #[print_attr] struct DeriveAttribute {}
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:22:1: 22:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_attr",
- span: $DIR/attribute-after-derive.rs:22:3: 22:13 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:22:2: 22:14 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/attribute-after-derive.rs:23:1: 23:7 (#0),
- },
- Ident {
- ident: "DeriveAttribute",
- span: $DIR/attribute-after-derive.rs:23:8: 23:23 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/attribute-after-derive.rs:23:24: 26:2 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): struct DeriveAttribute { #[cfg(FALSE)] field : u8, }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/attribute-after-derive.rs:23:1: 23:7 (#0),
- },
- Ident {
- ident: "DeriveAttribute",
- span: $DIR/attribute-after-derive.rs:23:8: 23:23 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:24:5: 24:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/attribute-after-derive.rs:24:7: 24:10 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/attribute-after-derive.rs:24:11: 24:16 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:24:10: 24:17 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:24:6: 24:18 (#0),
- },
- Ident {
- ident: "field",
- span: $DIR/attribute-after-derive.rs:25:5: 25:10 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:25:10: 25:11 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/attribute-after-derive.rs:25:12: 25:14 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/attribute-after-derive.rs:25:14: 25:15 (#0),
- },
- ],
- span: $DIR/attribute-after-derive.rs:23:24: 26:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/attribute-spans-preserved.rs b/src/test/ui/proc-macro/attribute-spans-preserved.rs
deleted file mode 100644
index c01fce905..000000000
--- a/src/test/ui/proc-macro/attribute-spans-preserved.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// aux-build:attribute-spans-preserved.rs
-
-extern crate attribute_spans_preserved as foo;
-
-use foo::foo;
-
-#[ foo ( let y: u32 = "z"; ) ] //~ ERROR: mismatched types
-#[ bar { let x: u32 = "y"; } ] //~ ERROR: mismatched types
-fn main() {
-}
diff --git a/src/test/ui/proc-macro/attribute-spans-preserved.stderr b/src/test/ui/proc-macro/attribute-spans-preserved.stderr
deleted file mode 100644
index 193482a42..000000000
--- a/src/test/ui/proc-macro/attribute-spans-preserved.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/attribute-spans-preserved.rs:7:23
- |
-LL | #[ foo ( let y: u32 = "z"; ) ]
- | --- ^^^ expected `u32`, found `&str`
- | |
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/attribute-spans-preserved.rs:8:23
- |
-LL | #[ bar { let x: u32 = "y"; } ]
- | --- ^^^ expected `u32`, found `&str`
- | |
- | expected due to this
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/attribute-spans-preserved.stdout b/src/test/ui/proc-macro/attribute-spans-preserved.stdout
deleted file mode 100644
index cf9a97491..000000000
--- a/src/test/ui/proc-macro/attribute-spans-preserved.stdout
+++ /dev/null
@@ -1 +0,0 @@
-fn main() { let y : u32 = "z" ; { let x : u32 = "y" ; } }
diff --git a/src/test/ui/proc-macro/attribute-with-error.rs b/src/test/ui/proc-macro/attribute-with-error.rs
deleted file mode 100644
index aaa6c07dd..000000000
--- a/src/test/ui/proc-macro/attribute-with-error.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-// aux-build:test-macros.rs
-
-#![feature(custom_inner_attributes)]
-
-#[macro_use]
-extern crate test_macros;
-
-#[recollect_attr]
-fn test1() {
- let a: i32 = "foo";
- //~^ ERROR: mismatched types
- let b: i32 = "f'oo";
- //~^ ERROR: mismatched types
-}
-
-fn test2() {
- #![recollect_attr]
-
- // FIXME: should have a type error here and assert it works but it doesn't
-}
-
-trait A {
- // FIXME: should have a #[recollect_attr] attribute here and assert that it works
- fn foo(&self) {
- let a: i32 = "foo";
- //~^ ERROR: mismatched types
- }
-}
-
-struct B;
-
-impl A for B {
- #[recollect_attr]
- fn foo(&self) {
- let a: i32 = "foo";
- //~^ ERROR: mismatched types
- }
-}
-
-#[recollect_attr]
-fn main() {
-}
diff --git a/src/test/ui/proc-macro/attribute-with-error.stderr b/src/test/ui/proc-macro/attribute-with-error.stderr
deleted file mode 100644
index 7f3a7e670..000000000
--- a/src/test/ui/proc-macro/attribute-with-error.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/attribute-with-error.rs:10:18
- |
-LL | let a: i32 = "foo";
- | --- ^^^^^ expected `i32`, found `&str`
- | |
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/attribute-with-error.rs:12:18
- |
-LL | let b: i32 = "f'oo";
- | --- ^^^^^^ expected `i32`, found `&str`
- | |
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/attribute-with-error.rs:25:22
- |
-LL | let a: i32 = "foo";
- | --- ^^^^^ expected `i32`, found `&str`
- | |
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/attribute-with-error.rs:35:22
- |
-LL | let a: i32 = "foo";
- | --- ^^^^^ expected `i32`, found `&str`
- | |
- | expected due to this
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/attribute.rs b/src/test/ui/proc-macro/attribute.rs
deleted file mode 100644
index 5531b3236..000000000
--- a/src/test/ui/proc-macro/attribute.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro_derive] //~ ERROR malformed `proc_macro_derive` attribute
-pub fn foo1(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive = ""] //~ ERROR malformed `proc_macro_derive` attribute
-pub fn foo2(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d3, a, b)]
-//~^ ERROR attribute must have either one or two arguments
-pub fn foo3(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d4, attributes(a), b)]
-//~^ ERROR attribute must have either one or two arguments
-pub fn foo4(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive("a")]
-//~^ ERROR: not a meta item
-pub fn foo5(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d6 = "")]
-//~^ ERROR: must only be one word
-pub fn foo6(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(m::d7)]
-//~^ ERROR: must only be one word
-pub fn foo7(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d8(a))]
-//~^ ERROR: must only be one word
-pub fn foo8(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(self)]
-//~^ ERROR: `self` cannot be a name of derive macro
-pub fn foo9(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(PartialEq)] // OK
-pub fn foo10(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d11, a)]
-//~^ ERROR: second argument must be `attributes`
-//~| ERROR: attribute must be of form: `attributes(foo, bar)`
-pub fn foo11(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d12, attributes)]
-//~^ ERROR: attribute must be of form: `attributes(foo, bar)`
-pub fn foo12(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d13, attributes("a"))]
-//~^ ERROR: not a meta item
-pub fn foo13(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d14, attributes(a = ""))]
-//~^ ERROR: must only be one word
-pub fn foo14(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d15, attributes(m::a))]
-//~^ ERROR: must only be one word
-pub fn foo15(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d16, attributes(a(b)))]
-//~^ ERROR: must only be one word
-pub fn foo16(input: TokenStream) -> TokenStream { input }
-
-#[proc_macro_derive(d17, attributes(self))]
-//~^ ERROR: `self` cannot be a name of derive helper attribute
-pub fn foo17(input: TokenStream) -> TokenStream { input }
diff --git a/src/test/ui/proc-macro/attribute.stderr b/src/test/ui/proc-macro/attribute.stderr
deleted file mode 100644
index 021e7cad0..000000000
--- a/src/test/ui/proc-macro/attribute.stderr
+++ /dev/null
@@ -1,104 +0,0 @@
-error: malformed `proc_macro_derive` attribute input
- --> $DIR/attribute.rs:9:1
- |
-LL | #[proc_macro_derive]
- | ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
-
-error: malformed `proc_macro_derive` attribute input
- --> $DIR/attribute.rs:12:1
- |
-LL | #[proc_macro_derive = ""]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_derive(TraitName, /*opt*/ attributes(name1, name2, ...))]`
-
-error: attribute must have either one or two arguments
- --> $DIR/attribute.rs:15:1
- |
-LL | #[proc_macro_derive(d3, a, b)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: attribute must have either one or two arguments
- --> $DIR/attribute.rs:19:1
- |
-LL | #[proc_macro_derive(d4, attributes(a), b)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: not a meta item
- --> $DIR/attribute.rs:23:21
- |
-LL | #[proc_macro_derive("a")]
- | ^^^
-
-error: must only be one word
- --> $DIR/attribute.rs:27:21
- |
-LL | #[proc_macro_derive(d6 = "")]
- | ^^^^^^^
-
-error: must only be one word
- --> $DIR/attribute.rs:31:21
- |
-LL | #[proc_macro_derive(m::d7)]
- | ^^^^^
-
-error: must only be one word
- --> $DIR/attribute.rs:35:21
- |
-LL | #[proc_macro_derive(d8(a))]
- | ^^^^^
-
-error: `self` cannot be a name of derive macro
- --> $DIR/attribute.rs:39:21
- |
-LL | #[proc_macro_derive(self)]
- | ^^^^
-
-error: second argument must be `attributes`
- --> $DIR/attribute.rs:46:26
- |
-LL | #[proc_macro_derive(d11, a)]
- | ^
-
-error: attribute must be of form: `attributes(foo, bar)`
- --> $DIR/attribute.rs:46:26
- |
-LL | #[proc_macro_derive(d11, a)]
- | ^
-
-error: attribute must be of form: `attributes(foo, bar)`
- --> $DIR/attribute.rs:51:26
- |
-LL | #[proc_macro_derive(d12, attributes)]
- | ^^^^^^^^^^
-
-error: not a meta item
- --> $DIR/attribute.rs:55:37
- |
-LL | #[proc_macro_derive(d13, attributes("a"))]
- | ^^^
-
-error: must only be one word
- --> $DIR/attribute.rs:59:37
- |
-LL | #[proc_macro_derive(d14, attributes(a = ""))]
- | ^^^^^^
-
-error: must only be one word
- --> $DIR/attribute.rs:63:37
- |
-LL | #[proc_macro_derive(d15, attributes(m::a))]
- | ^^^^
-
-error: must only be one word
- --> $DIR/attribute.rs:67:37
- |
-LL | #[proc_macro_derive(d16, attributes(a(b)))]
- | ^^^^
-
-error: `self` cannot be a name of derive helper attribute
- --> $DIR/attribute.rs:71:37
- |
-LL | #[proc_macro_derive(d17, attributes(self))]
- | ^^^^
-
-error: aborting due to 17 previous errors
-
diff --git a/src/test/ui/proc-macro/attributes-included.rs b/src/test/ui/proc-macro/attributes-included.rs
deleted file mode 100644
index 95e8e10a3..000000000
--- a/src/test/ui/proc-macro/attributes-included.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// aux-build:attributes-included.rs
-// check-pass
-
-#![warn(unused)]
-
-extern crate attributes_included;
-
-use attributes_included::*;
-
-#[bar]
-#[inline]
-/// doc
-#[foo]
-#[inline]
-/// doc
-fn foo() {
- let a: i32 = "foo"; //~ WARN: unused variable
-}
-
-fn main() {
- foo()
-}
diff --git a/src/test/ui/proc-macro/attributes-included.stderr b/src/test/ui/proc-macro/attributes-included.stderr
deleted file mode 100644
index 72c88d5d8..000000000
--- a/src/test/ui/proc-macro/attributes-included.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-warning: unused variable: `a`
- --> $DIR/attributes-included.rs:17:9
- |
-LL | let a: i32 = "foo";
- | ^ help: if this is intentional, prefix it with an underscore: `_a`
- |
-note: the lint level is defined here
- --> $DIR/attributes-included.rs:4:9
- |
-LL | #![warn(unused)]
- | ^^^^^^
- = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/proc-macro/attributes-on-definitions.rs b/src/test/ui/proc-macro/attributes-on-definitions.rs
deleted file mode 100644
index c0733c8b4..000000000
--- a/src/test/ui/proc-macro/attributes-on-definitions.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// check-pass
-// aux-build:attributes-on-definitions.rs
-
-#![forbid(unsafe_code)]
-
-extern crate attributes_on_definitions;
-
-attributes_on_definitions::with_attrs!();
-//~^ WARN use of deprecated
-// No errors about the use of unstable and unsafe code inside the macro.
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/attributes-on-definitions.stderr b/src/test/ui/proc-macro/attributes-on-definitions.stderr
deleted file mode 100644
index c63dd0011..000000000
--- a/src/test/ui/proc-macro/attributes-on-definitions.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: use of deprecated macro `attributes_on_definitions::with_attrs`: test
- --> $DIR/attributes-on-definitions.rs:8:1
- |
-LL | attributes_on_definitions::with_attrs!();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: `#[warn(deprecated)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/proc-macro/attributes-on-modules-fail.rs b/src/test/ui/proc-macro/attributes-on-modules-fail.rs
deleted file mode 100644
index 6c30e8f4f..000000000
--- a/src/test/ui/proc-macro/attributes-on-modules-fail.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[identity_attr]
-mod m {
- pub struct X;
-
- type A = Y; //~ ERROR cannot find type `Y` in this scope
-}
-
-struct Y;
-type A = X; //~ ERROR cannot find type `X` in this scope
-
-#[derive(Copy)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
-mod n {}
-
-#[empty_attr]
-mod module; //~ ERROR non-inline modules in proc macro input are unstable
-
-#[empty_attr]
-mod outer {
- mod inner; //~ ERROR non-inline modules in proc macro input are unstable
-
- mod inner_inline {} // OK
-}
-
-#[derive(Empty)]
-struct S {
- field: [u8; {
- #[path = "outer/inner.rs"]
- mod inner; //~ ERROR non-inline modules in proc macro input are unstable
- mod inner_inline {} // OK
- 0
- }]
-}
-
-#[identity_attr]
-fn f() {
- #[path = "outer/inner.rs"]
- mod inner; //~ ERROR non-inline modules in proc macro input are unstable
- mod inner_inline {} // OK
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/attributes-on-modules-fail.stderr b/src/test/ui/proc-macro/attributes-on-modules-fail.stderr
deleted file mode 100644
index bb6cbb698..000000000
--- a/src/test/ui/proc-macro/attributes-on-modules-fail.stderr
+++ /dev/null
@@ -1,70 +0,0 @@
-error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
- --> $DIR/attributes-on-modules-fail.rs:16:1
- |
-LL | #[derive(Copy)]
- | ^^^^^^^^^^^^^^^ not applicable here
-LL | mod n {}
- | -------- not a `struct`, `enum` or `union`
-
-error[E0658]: non-inline modules in proc macro input are unstable
- --> $DIR/attributes-on-modules-fail.rs:20:1
- |
-LL | mod module;
- | ^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: non-inline modules in proc macro input are unstable
- --> $DIR/attributes-on-modules-fail.rs:24:5
- |
-LL | mod inner;
- | ^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: non-inline modules in proc macro input are unstable
- --> $DIR/attributes-on-modules-fail.rs:33:9
- |
-LL | mod inner;
- | ^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: non-inline modules in proc macro input are unstable
- --> $DIR/attributes-on-modules-fail.rs:42:5
- |
-LL | mod inner;
- | ^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0412]: cannot find type `Y` in this scope
- --> $DIR/attributes-on-modules-fail.rs:10:14
- |
-LL | type A = Y;
- | ^ not found in this scope
- |
-help: consider importing this struct
- |
-LL | use Y;
- |
-
-error[E0412]: cannot find type `X` in this scope
- --> $DIR/attributes-on-modules-fail.rs:14:10
- |
-LL | type A = X;
- | ^ not found in this scope
- |
-help: consider importing this struct
- |
-LL | use m::X;
- |
-
-error: aborting due to 7 previous errors
-
-Some errors have detailed explanations: E0412, E0658, E0774.
-For more information about an error, try `rustc --explain E0412`.
diff --git a/src/test/ui/proc-macro/attributes-on-modules.rs b/src/test/ui/proc-macro/attributes-on-modules.rs
deleted file mode 100644
index 6c73b0bf1..000000000
--- a/src/test/ui/proc-macro/attributes-on-modules.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[identity_attr]
-mod m {
- pub struct S;
-}
-
-#[identity_attr]
-fn f() {
- mod m {}
-}
-
-fn main() {
- let s = m::S;
-}
diff --git a/src/test/ui/proc-macro/auxiliary/add-impl.rs b/src/test/ui/proc-macro/auxiliary/add-impl.rs
deleted file mode 100644
index 741e64875..000000000
--- a/src/test/ui/proc-macro/auxiliary/add-impl.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(AddImpl)]
-// #[cfg(proc_macro)]
-pub fn derive(input: TokenStream) -> TokenStream {
- "impl B {
- fn foo(&self) {}
- }
-
- fn foo() {}
-
- mod bar { pub fn foo() {} }
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/amputate-span.rs b/src/test/ui/proc-macro/auxiliary/amputate-span.rs
deleted file mode 100644
index 1a82119ae..000000000
--- a/src/test/ui/proc-macro/auxiliary/amputate-span.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn drop_first_token(attr: TokenStream, input: TokenStream) -> TokenStream {
- assert!(attr.is_empty());
- input.into_iter().skip(1).collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/api/cmp.rs b/src/test/ui/proc-macro/auxiliary/api/cmp.rs
deleted file mode 100644
index 5784a6e5d..000000000
--- a/src/test/ui/proc-macro/auxiliary/api/cmp.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-use proc_macro::{LineColumn, Punct, Spacing};
-
-pub fn test() {
- test_line_column_ord();
- test_punct_eq();
-}
-
-fn test_line_column_ord() {
- let line0_column0 = LineColumn { line: 0, column: 0 };
- let line0_column1 = LineColumn { line: 0, column: 1 };
- let line1_column0 = LineColumn { line: 1, column: 0 };
- assert!(line0_column0 < line0_column1);
- assert!(line0_column1 < line1_column0);
-}
-
-fn test_punct_eq() {
- let colon_alone = Punct::new(':', Spacing::Alone);
- assert_eq!(colon_alone, ':');
- let colon_joint = Punct::new(':', Spacing::Joint);
- assert_eq!(colon_joint, ':');
-}
diff --git a/src/test/ui/proc-macro/auxiliary/api/mod.rs b/src/test/ui/proc-macro/auxiliary/api/mod.rs
deleted file mode 100644
index 739c25132..000000000
--- a/src/test/ui/proc-macro/auxiliary/api/mod.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![crate_name = "proc_macro_api_tests"]
-#![feature(proc_macro_span)]
-#![deny(dead_code)] // catch if a test function is never called
-
-extern crate proc_macro;
-
-mod cmp;
-mod parse;
-
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn run(input: TokenStream) -> TokenStream {
- assert!(input.is_empty());
-
- cmp::test();
- parse::test();
-
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/api/parse.rs b/src/test/ui/proc-macro/auxiliary/api/parse.rs
deleted file mode 100644
index 27391f831..000000000
--- a/src/test/ui/proc-macro/auxiliary/api/parse.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-// ignore-tidy-linelength
-
-use proc_macro::Literal;
-
-pub fn test() {
- test_display_literal();
- test_parse_literal();
-}
-
-fn test_display_literal() {
- assert_eq!(Literal::isize_unsuffixed(-10).to_string(), "-10");
- assert_eq!(Literal::isize_suffixed(-10).to_string(), "-10isize");
- assert_eq!(Literal::f32_unsuffixed(-10.0).to_string(), "-10.0");
- assert_eq!(Literal::f32_suffixed(-10.0).to_string(), "-10f32");
- assert_eq!(Literal::f64_unsuffixed(-10.0).to_string(), "-10.0");
- assert_eq!(Literal::f64_suffixed(-10.0).to_string(), "-10f64");
- assert_eq!(
- Literal::f64_unsuffixed(1e100).to_string(),
- "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0",
- );
-
- assert_eq!(
- Literal::string("a \t ❤ ' \" \u{1}").to_string(),
- "\"a \\t ❤ ' \\\" \\u{1}\"",
- );
- assert_eq!(Literal::character('a').to_string(), "'a'");
- assert_eq!(Literal::character('\t').to_string(), "'\\t'");
- assert_eq!(Literal::character('❤').to_string(), "'❤'");
- assert_eq!(Literal::character('\'').to_string(), "'\\''");
- assert_eq!(Literal::character('"').to_string(), "'\"'");
- assert_eq!(Literal::character('\u{1}').to_string(), "'\\u{1}'");
-}
-
-fn test_parse_literal() {
- assert_eq!("1".parse::<Literal>().unwrap().to_string(), "1");
- assert_eq!("1.0".parse::<Literal>().unwrap().to_string(), "1.0");
- assert_eq!("'a'".parse::<Literal>().unwrap().to_string(), "'a'");
- assert_eq!("\"\n\"".parse::<Literal>().unwrap().to_string(), "\"\n\"");
- assert_eq!("b\"\"".parse::<Literal>().unwrap().to_string(), "b\"\"");
- assert_eq!("r##\"\"##".parse::<Literal>().unwrap().to_string(), "r##\"\"##");
- assert_eq!("10ulong".parse::<Literal>().unwrap().to_string(), "10ulong");
- assert_eq!("-10ulong".parse::<Literal>().unwrap().to_string(), "-10ulong");
-
- assert!("true".parse::<Literal>().is_err());
- assert!(".8".parse::<Literal>().is_err());
- assert!("0 1".parse::<Literal>().is_err());
- assert!("'a".parse::<Literal>().is_err());
- assert!(" 0".parse::<Literal>().is_err());
- assert!("0 ".parse::<Literal>().is_err());
- assert!("/* comment */0".parse::<Literal>().is_err());
- assert!("0/* comment */".parse::<Literal>().is_err());
- assert!("0// comment".parse::<Literal>().is_err());
- assert!("- 10".parse::<Literal>().is_err());
- assert!("-'x'".parse::<Literal>().is_err());
-}
diff --git a/src/test/ui/proc-macro/auxiliary/append-impl.rs b/src/test/ui/proc-macro/auxiliary/append-impl.rs
deleted file mode 100644
index b032b1337..000000000
--- a/src/test/ui/proc-macro/auxiliary/append-impl.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Append)]
-pub fn derive_a(input: TokenStream) -> TokenStream {
- "impl Append for A {
- fn foo(&self) {}
- }
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/assert-span-pos.rs b/src/test/ui/proc-macro/auxiliary/assert-span-pos.rs
deleted file mode 100644
index 455c5c7c3..000000000
--- a/src/test/ui/proc-macro/auxiliary/assert-span-pos.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_diagnostic, proc_macro_span)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Span};
-
-fn lit_span(tt: TokenTree) -> (Span, String) {
- match tt {
- TokenTree::Literal(..) |
- TokenTree::Group(..) => (tt.span(), tt.to_string().trim().into()),
- _ => panic!("expected a literal in token tree, got: {:?}", tt)
- }
-}
-
-#[proc_macro]
-pub fn assert_span_pos(input: TokenStream) -> TokenStream {
- let mut tokens = input.into_iter();
- let (sp1, str1) = lit_span(tokens.next().expect("first argument"));
- let _ = tokens.next();
- let (_sp2, str2) = lit_span(tokens.next().expect("second argument"));
-
- let line: usize = str1.parse().unwrap();
- let col: usize = str2.parse().unwrap();
-
- let sp1s = sp1.start();
- if (line, col) != (sp1s.line, sp1s.column) {
- let msg = format!("line/column mismatch: ({}, {}) != ({}, {})", line, col,
- sp1s.line, sp1s.column);
- sp1.error(msg).emit();
- }
-
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attr-args.rs b/src/test/ui/proc-macro/auxiliary/attr-args.rs
deleted file mode 100644
index 5f76a4484..000000000
--- a/src/test/ui/proc-macro/auxiliary/attr-args.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn attr_with_args(args: TokenStream, input: TokenStream) -> TokenStream {
- let args = args.to_string();
-
- assert_eq!(args, r#"text = "Hello, world!""#);
-
- let input = input.to_string();
-
- assert_eq!(input, "fn foo() {}");
-
- r#"
- fn foo() -> &'static str { "Hello, world!" }
- "#.parse().unwrap()
-}
-
-#[proc_macro_attribute]
-pub fn identity(attr_args: TokenStream, _: TokenStream) -> TokenStream {
- attr_args
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attr-cfg.rs b/src/test/ui/proc-macro/auxiliary/attr-cfg.rs
deleted file mode 100644
index 2f0054cc1..000000000
--- a/src/test/ui/proc-macro/auxiliary/attr-cfg.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn attr_cfg(args: TokenStream, input: TokenStream) -> TokenStream {
- let input_str = input.to_string();
-
- assert_eq!(input_str, "fn outer() -> u8
-{
- #[cfg(foo)] fn inner() -> u8 { 1 } #[cfg(bar)] fn inner() -> u8 { 2 }
- inner()
-}");
-
- input
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attr-on-trait.rs b/src/test/ui/proc-macro/auxiliary/attr-on-trait.rs
deleted file mode 100644
index 3787b8eec..000000000
--- a/src/test/ui/proc-macro/auxiliary/attr-on-trait.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn foo(attr: TokenStream, item: TokenStream) -> TokenStream {
- drop(attr);
- assert_eq!(item.to_string(), "fn foo() {}");
- "fn foo(&self);".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs b/src/test/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs
deleted file mode 100644
index 5b386b46b..000000000
--- a/src/test/ui/proc-macro/auxiliary/attr-stmt-expr-rpass.rs
+++ /dev/null
@@ -1,51 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn expect_let(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "let string = \"Hello, world!\" ;");
- item
-}
-
-#[proc_macro_attribute]
-pub fn expect_print_stmt(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "println! (\"{}\", string) ;");
- item
-}
-
-#[proc_macro_attribute]
-pub fn expect_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "print_str(\"string\")");
- item
-}
-
-#[proc_macro_attribute]
-pub fn expect_print_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "println! (\"{}\", string)");
- item
-}
-
-#[proc_macro_attribute]
-pub fn no_output(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert!(!item.to_string().is_empty());
- "".parse().unwrap()
-
-}
-
-#[proc_macro_attribute]
-pub fn noop(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert!(!item.to_string().is_empty());
- item
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attr-stmt-expr.rs b/src/test/ui/proc-macro/auxiliary/attr-stmt-expr.rs
deleted file mode 100644
index 4d6dc06b4..000000000
--- a/src/test/ui/proc-macro/auxiliary/attr-stmt-expr.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn expect_let(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "let string = \"Hello, world!\" ;");
- item
-}
-
-#[proc_macro_attribute]
-pub fn expect_my_macro_stmt(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "my_macro! (\"{}\", string) ;");
- item
-}
-
-#[proc_macro_attribute]
-pub fn expect_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "print_str(\"string\")");
- item
-}
-
-#[proc_macro_attribute]
-pub fn expect_my_macro_expr(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert_eq!(item.to_string(), "my_macro! (\"{}\", string)");
- item
-}
-
-#[proc_macro_attribute]
-pub fn duplicate(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- format!("{}, {}", item, item).parse().unwrap()
-}
-
-#[proc_macro_attribute]
-pub fn no_output(attr: TokenStream, item: TokenStream) -> TokenStream {
- assert!(attr.to_string().is_empty());
- assert!(!item.to_string().is_empty());
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attribute-spans-preserved.rs b/src/test/ui/proc-macro/auxiliary/attribute-spans-preserved.rs
deleted file mode 100644
index 4d3279584..000000000
--- a/src/test/ui/proc-macro/auxiliary/attribute-spans-preserved.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro_attribute]
-pub fn foo(attr: TokenStream, f: TokenStream) -> TokenStream {
- let mut tokens = f.into_iter();
- assert_eq!(tokens.next().unwrap().to_string(), "#");
- let next_attr = match tokens.next().unwrap() {
- TokenTree::Group(g) => g,
- _ => panic!(),
- };
-
- let fn_tok = tokens.next().unwrap();
- let ident_tok = tokens.next().unwrap();
- let args_tok = tokens.next().unwrap();
- let body = tokens.next().unwrap();
-
- let new_body = attr.into_iter()
- .chain(next_attr.stream().into_iter().skip(1));
-
- let tokens = vec![
- fn_tok,
- ident_tok,
- args_tok,
- Group::new(Delimiter::Brace, new_body.collect()).into(),
- ].into_iter().collect::<TokenStream>();
- println!("{}", tokens);
- return tokens
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attributes-included.rs b/src/test/ui/proc-macro/auxiliary/attributes-included.rs
deleted file mode 100644
index a5eb40b28..000000000
--- a/src/test/ui/proc-macro/auxiliary/attributes-included.rs
+++ /dev/null
@@ -1,150 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Delimiter, Literal, Spacing, Group};
-
-#[proc_macro_attribute]
-pub fn foo(attr: TokenStream, input: TokenStream) -> TokenStream {
- assert!(attr.is_empty());
- let input = input.into_iter().collect::<Vec<_>>();
- {
- let mut cursor = &input[..];
- assert_inline(&mut cursor);
- assert_doc(&mut cursor);
- assert_inline(&mut cursor);
- assert_doc(&mut cursor);
- assert_foo(&mut cursor);
- assert!(cursor.is_empty());
- }
- fold_stream(input.into_iter().collect())
-}
-
-#[proc_macro_attribute]
-pub fn bar(attr: TokenStream, input: TokenStream) -> TokenStream {
- assert!(attr.is_empty());
- let input = input.into_iter().collect::<Vec<_>>();
- {
- let mut cursor = &input[..];
- assert_inline(&mut cursor);
- assert_doc(&mut cursor);
- assert_invoc(&mut cursor);
- assert_inline(&mut cursor);
- assert_doc(&mut cursor);
- assert_foo(&mut cursor);
- assert!(cursor.is_empty());
- }
- input.into_iter().collect()
-}
-
-fn assert_inline(slice: &mut &[TokenTree]) {
- match &slice[0] {
- TokenTree::Punct(tt) => assert_eq!(tt.as_char(), '#'),
- _ => panic!("expected '#' char"),
- }
- match &slice[1] {
- TokenTree::Group(tt) => assert_eq!(tt.delimiter(), Delimiter::Bracket),
- _ => panic!("expected brackets"),
- }
- *slice = &slice[2..];
-}
-
-fn assert_doc(slice: &mut &[TokenTree]) {
- match &slice[0] {
- TokenTree::Punct(tt) => {
- assert_eq!(tt.as_char(), '#');
- assert_eq!(tt.spacing(), Spacing::Alone);
- }
- _ => panic!("expected #"),
- }
- let inner = match &slice[1] {
- TokenTree::Group(tt) => {
- assert_eq!(tt.delimiter(), Delimiter::Bracket);
- tt.stream()
- }
- _ => panic!("expected brackets"),
- };
- let tokens = inner.into_iter().collect::<Vec<_>>();
- let tokens = &tokens[..];
-
- if tokens.len() != 3 {
- panic!("expected three tokens in doc")
- }
-
- match &tokens[0] {
- TokenTree::Ident(tt) => assert_eq!("doc", &*tt.to_string()),
- _ => panic!("expected `doc`"),
- }
- match &tokens[1] {
- TokenTree::Punct(tt) => {
- assert_eq!(tt.as_char(), '=');
- assert_eq!(tt.spacing(), Spacing::Alone);
- }
- _ => panic!("expected equals"),
- }
- match tokens[2] {
- TokenTree::Literal(_) => {}
- _ => panic!("expected literal"),
- }
-
- *slice = &slice[2..];
-}
-
-fn assert_invoc(slice: &mut &[TokenTree]) {
- match &slice[0] {
- TokenTree::Punct(tt) => assert_eq!(tt.as_char(), '#'),
- _ => panic!("expected '#' char"),
- }
- match &slice[1] {
- TokenTree::Group(tt) => assert_eq!(tt.delimiter(), Delimiter::Bracket),
- _ => panic!("expected brackets"),
- }
- *slice = &slice[2..];
-}
-
-fn assert_foo(slice: &mut &[TokenTree]) {
- match &slice[0] {
- TokenTree::Ident(tt) => assert_eq!(&*tt.to_string(), "fn"),
- _ => panic!("expected fn"),
- }
- match &slice[1] {
- TokenTree::Ident(tt) => assert_eq!(&*tt.to_string(), "foo"),
- _ => panic!("expected foo"),
- }
- match &slice[2] {
- TokenTree::Group(tt) => {
- assert_eq!(tt.delimiter(), Delimiter::Parenthesis);
- assert!(tt.stream().is_empty());
- }
- _ => panic!("expected parens"),
- }
- match &slice[3] {
- TokenTree::Group(tt) => assert_eq!(tt.delimiter(), Delimiter::Brace),
- _ => panic!("expected braces"),
- }
- *slice = &slice[4..];
-}
-
-fn fold_stream(input: TokenStream) -> TokenStream {
- input.into_iter().map(fold_tree).collect()
-}
-
-fn fold_tree(input: TokenTree) -> TokenTree {
- match input {
- TokenTree::Group(b) => {
- TokenTree::Group(Group::new(b.delimiter(), fold_stream(b.stream())))
- }
- TokenTree::Punct(b) => TokenTree::Punct(b),
- TokenTree::Ident(a) => TokenTree::Ident(a),
- TokenTree::Literal(a) => {
- if a.to_string() != "\"foo\"" {
- TokenTree::Literal(a)
- } else {
- TokenTree::Literal(Literal::i32_unsuffixed(3))
- }
- }
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/attributes-on-definitions.rs b/src/test/ui/proc-macro/auxiliary/attributes-on-definitions.rs
deleted file mode 100644
index 93a339840..000000000
--- a/src/test/ui/proc-macro/auxiliary/attributes-on-definitions.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(allow_internal_unsafe)]
-#![feature(allow_internal_unstable)]
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-#[allow_internal_unstable(proc_macro_internals)]
-#[allow_internal_unsafe]
-#[deprecated(since = "1.0.0", note = "test")]
-pub fn with_attrs(_: TokenStream) -> TokenStream {
- "
- extern crate proc_macro;
- use ::proc_macro::bridge;
-
- fn contains_unsafe() { unsafe {} }
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/bang-macro.rs b/src/test/ui/proc-macro/auxiliary/bang-macro.rs
deleted file mode 100644
index ff0002282..000000000
--- a/src/test/ui/proc-macro/auxiliary/bang-macro.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn rewrite(input: TokenStream) -> TokenStream {
- let input = input.to_string();
-
- assert_eq!(input, r#""Hello, world!""#);
-
- r#""NOT Hello, world!""#.parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/bang_proc_macro2.rs b/src/test/ui/proc-macro/auxiliary/bang_proc_macro2.rs
deleted file mode 100644
index fcaaba602..000000000
--- a/src/test/ui/proc-macro/auxiliary/bang_proc_macro2.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn bang_proc_macro2(_: TokenStream) -> TokenStream {
- "let x = foobar2;".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/builtin-attrs.rs b/src/test/ui/proc-macro/auxiliary/builtin-attrs.rs
deleted file mode 100644
index 6edafae39..000000000
--- a/src/test/ui/proc-macro/auxiliary/builtin-attrs.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro_attribute]
-pub fn feature(_: TokenStream, input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_attribute]
-pub fn repr(_: TokenStream, input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_attribute]
-pub fn test(_: TokenStream, input: TokenStream) -> TokenStream {
- "struct Test;".parse().unwrap()
-}
-
-#[proc_macro_attribute]
-pub fn bench(_: TokenStream, input: TokenStream) -> TokenStream {
- "struct Bench;".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/call-deprecated.rs b/src/test/ui/proc-macro/auxiliary/call-deprecated.rs
deleted file mode 100644
index 2f484809a..000000000
--- a/src/test/ui/proc-macro/auxiliary/call-deprecated.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro_attribute]
-#[deprecated(since = "1.0.0", note = "test")]
-pub fn attr(_: TokenStream, input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_attribute]
-#[deprecated(since = "1.0.0", note = "test")]
-pub fn attr_remove(_: TokenStream, _: TokenStream) -> TokenStream {
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/call-site.rs b/src/test/ui/proc-macro/auxiliary/call-site.rs
deleted file mode 100644
index e64a5a343..000000000
--- a/src/test/ui/proc-macro/auxiliary/call-site.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn check(input: TokenStream) -> TokenStream {
- // Parsed `x2` can refer to `x2` from `input`
- let parsed1: TokenStream = "let x3 = x2;".parse().unwrap();
- // `x3` parsed from one string can refer to `x3` parsed from another string.
- let parsed2: TokenStream = "let x4 = x3;".parse().unwrap();
- // Manually assembled `x4` can refer to parsed `x4`.
- let manual: Vec<TokenTree> = vec![
- Ident::new("let", Span::call_site()).into(),
- Ident::new("x5", Span::call_site()).into(),
- Punct::new('=', Spacing::Alone).into(),
- Ident::new("x4", Span::call_site()).into(),
- Punct::new(';', Spacing::Alone).into(),
- ];
- input.into_iter().chain(parsed1.into_iter())
- .chain(parsed2.into_iter())
- .chain(manual.into_iter())
- .collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/cond_plugin.rs b/src/test/ui/proc-macro/auxiliary/cond_plugin.rs
deleted file mode 100644
index 8d3c4ec23..000000000
--- a/src/test/ui/proc-macro/auxiliary/cond_plugin.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_quote)]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro]
-pub fn cond(input: TokenStream) -> TokenStream {
- let mut conds = Vec::new();
- let mut input = input.into_iter().peekable();
- while let Some(tree) = input.next() {
- let cond = match tree {
- TokenTree::Group(tt) => tt.stream(),
- _ => panic!("Invalid input"),
- };
- let mut cond_trees = cond.clone().into_iter();
- let test = cond_trees.next().expect("Unexpected empty condition in `cond!`");
- let rhs = cond_trees.collect::<TokenStream>();
- if rhs.is_empty() {
- panic!("Invalid macro usage in cond: {}", cond);
- }
- let is_else = match test {
- TokenTree::Ident(ref word) => &*word.to_string() == "else",
- _ => false,
- };
- conds.push(if is_else || input.peek().is_none() {
- quote!({ $rhs })
- } else {
- quote!(if $test { $rhs } else)
- });
- }
-
- conds.into_iter().flat_map(|x| x.into_iter()).collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/count_compound_ops.rs b/src/test/ui/proc-macro/auxiliary/count_compound_ops.rs
deleted file mode 100644
index 3a656d648..000000000
--- a/src/test/ui/proc-macro/auxiliary/count_compound_ops.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_quote)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Spacing, Literal, quote};
-
-#[proc_macro]
-pub fn count_compound_ops(input: TokenStream) -> TokenStream {
- assert_eq!(count_compound_ops_helper(quote!(++ (&&) 4@a)), 3);
- let l = Literal::u32_suffixed(count_compound_ops_helper(input));
- TokenTree::from(l).into()
-}
-
-fn count_compound_ops_helper(input: TokenStream) -> u32 {
- let mut count = 0;
- for token in input {
- match &token {
- TokenTree::Punct(tt) if tt.spacing() == Spacing::Alone => {
- count += 1;
- }
- TokenTree::Group(tt) => {
- count += count_compound_ops_helper(tt.stream());
- }
- _ => {}
- }
- }
- count
-}
diff --git a/src/test/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs b/src/test/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs
deleted file mode 100644
index 41f73f596..000000000
--- a/src/test/ui/proc-macro/auxiliary/custom-attr-only-one-derive.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Foo)]
-pub fn foo(a: TokenStream) -> TokenStream {
- "".parse().unwrap()
-}
-
-#[proc_macro_derive(Bar, attributes(custom))]
-pub fn bar(a: TokenStream) -> TokenStream {
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/custom-quote.rs b/src/test/ui/proc-macro/auxiliary/custom-quote.rs
deleted file mode 100644
index 3b7811748..000000000
--- a/src/test/ui/proc-macro/auxiliary/custom-quote.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// force-host
-// no-prefer-dynamic
-// ignore-tidy-linelength
-
-#![feature(proc_macro_quote)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use std::iter::FromIterator;
-use std::str::FromStr;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn custom_quote(input: TokenStream) -> TokenStream {
- let mut tokens: Vec<_> = input.into_iter().collect();
- assert_eq!(tokens.len(), 1, "Unexpected input: {:?}", tokens);
- match tokens.pop() {
- Some(TokenTree::Ident(ident)) => {
- assert_eq!(ident.to_string(), "my_ident");
-
- let proc_macro_crate = TokenStream::from_str("::proc_macro").unwrap();
- let quoted_span = proc_macro::quote_span(proc_macro_crate, ident.span());
- let prefix = TokenStream::from_str(r#"let mut ident = proc_macro::Ident::new("my_ident", proc_macro::Span::call_site());"#).unwrap();
- let set_span_method = TokenStream::from_str("ident.set_span").unwrap();
- let set_span_arg = TokenStream::from(TokenTree::Group(Group::new(Delimiter::Parenthesis, quoted_span)));
- let suffix = TokenStream::from_str(";proc_macro::TokenStream::from(proc_macro::TokenTree::Ident(ident))").unwrap();
- let full_stream = TokenStream::from_iter([prefix, set_span_method, set_span_arg, suffix]);
- full_stream
- }
- _ => unreachable!()
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-a.rs b/src/test/ui/proc-macro/auxiliary/derive-a.rs
deleted file mode 100644
index 79a3864bf..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-a.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(A)]
-pub fn derive(input: TokenStream) -> TokenStream {
- let input = input.to_string();
- assert!(input.contains("struct A ;"));
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-atob.rs b/src/test/ui/proc-macro/auxiliary/derive-atob.rs
deleted file mode 100644
index 207b7fd32..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-atob.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(AToB)]
-pub fn derive(input: TokenStream) -> TokenStream {
- let input = input.to_string();
- assert_eq!(input, "struct A ;");
- "struct B;".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-attr-cfg.rs b/src/test/ui/proc-macro/auxiliary/derive-attr-cfg.rs
deleted file mode 100644
index e7e9634e0..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-attr-cfg.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Foo, attributes(foo))]
-pub fn derive(input: TokenStream) -> TokenStream {
- assert!(!input.to_string().contains("#[cfg(any())]"));
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-b-rpass.rs b/src/test/ui/proc-macro/auxiliary/derive-b-rpass.rs
deleted file mode 100644
index 641a95f78..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-b-rpass.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(B, attributes(B, C))]
-pub fn derive(input: TokenStream) -> TokenStream {
- let input = input.to_string();
- assert!(input.contains("#[B [arbitrary tokens]]"));
- assert!(input.contains("struct B {"));
- assert!(input.contains("#[C]"));
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-b.rs b/src/test/ui/proc-macro/auxiliary/derive-b.rs
deleted file mode 100644
index e7ab6c072..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-b.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(B, attributes(B))]
-pub fn derive_b(input: TokenStream) -> TokenStream {
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-bad.rs b/src/test/ui/proc-macro/auxiliary/derive-bad.rs
deleted file mode 100644
index 90bb9b1ba..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-bad.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(A)]
-pub fn derive_a(_input: TokenStream) -> TokenStream {
- "struct A { inner }".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-clona.rs b/src/test/ui/proc-macro/auxiliary/derive-clona.rs
deleted file mode 100644
index 4a35c9d0d..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-clona.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Clona)]
-pub fn derive_clonea(input: TokenStream) -> TokenStream {
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-ctod.rs b/src/test/ui/proc-macro/auxiliary/derive-ctod.rs
deleted file mode 100644
index 2efe5a913..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-ctod.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(CToD)]
-pub fn derive(input: TokenStream) -> TokenStream {
- let input = input.to_string();
- assert_eq!(input, "struct C ;");
- "struct D;".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-foo.rs b/src/test/ui/proc-macro/auxiliary/derive-foo.rs
deleted file mode 100644
index 3ea027d4f..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-foo.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(FooWithLongName)]
-pub fn derive_foo(input: TokenStream) -> TokenStream {
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-helper-shadowed-2.rs b/src/test/ui/proc-macro/auxiliary/derive-helper-shadowed-2.rs
deleted file mode 100644
index ab532da29..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-helper-shadowed-2.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-#[macro_export]
-macro_rules! empty_helper { () => () }
diff --git a/src/test/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs b/src/test/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs
deleted file mode 100644
index 370a1a279..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-helper-shadowing-2.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro_derive(same_name, attributes(same_name))]
-pub fn derive_a(_: TokenStream) -> TokenStream {
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-helper-shadowing.rs b/src/test/ui/proc-macro/auxiliary/derive-helper-shadowing.rs
deleted file mode 100644
index 41d3a1846..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-helper-shadowing.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro_derive(GenHelperUse)]
-pub fn derive_a(_: TokenStream) -> TokenStream {
- "
- #[empty_helper]
- struct Uwu;
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-nothing.rs b/src/test/ui/proc-macro/auxiliary/derive-nothing.rs
deleted file mode 100644
index b6d1e133a..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-nothing.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Nothing)]
-pub fn nothing(input: TokenStream) -> TokenStream {
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-same-struct.rs b/src/test/ui/proc-macro/auxiliary/derive-same-struct.rs
deleted file mode 100644
index 7598d632c..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-same-struct.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(AToB)]
-pub fn derive1(input: TokenStream) -> TokenStream {
- println!("input1: {:?}", input.to_string());
- assert_eq!(input.to_string(), "struct A ;");
- "#[derive(BToC)] struct B;".parse().unwrap()
-}
-
-#[proc_macro_derive(BToC)]
-pub fn derive2(input: TokenStream) -> TokenStream {
- assert_eq!(input.to_string(), "struct B ;");
- "struct C;".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-two-attrs.rs b/src/test/ui/proc-macro/auxiliary/derive-two-attrs.rs
deleted file mode 100644
index a6f0eec12..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-two-attrs.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro_derive(A, attributes(b))]
-pub fn foo(_x: TokenStream) -> TokenStream {
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-union.rs b/src/test/ui/proc-macro/auxiliary/derive-union.rs
deleted file mode 100644
index 05883170c..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-union.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(UnionTest)]
-pub fn derive(input: TokenStream) -> TokenStream {
- let input = input.to_string();
- assert!(input.contains("#[repr(C)]"));
- assert!(input.contains("union Test {"));
- assert!(input.contains("a : u8,"));
- assert!(input.contains("}"));
- "".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-unstable-2.rs b/src/test/ui/proc-macro/auxiliary/derive-unstable-2.rs
deleted file mode 100644
index eac21b049..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-unstable-2.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Unstable)]
-pub fn derive(_input: TokenStream) -> TokenStream {
-
- "
- #[rustc_foo]
- fn foo() {}
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/derive-unstable.rs b/src/test/ui/proc-macro/auxiliary/derive-unstable.rs
deleted file mode 100644
index 2ccd3f882..000000000
--- a/src/test/ui/proc-macro/auxiliary/derive-unstable.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Unstable)]
-pub fn derive(_input: TokenStream) -> TokenStream {
-
- "unsafe fn foo() -> u32 { ::std::intrinsics::abort() }".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/dollar-crate-external.rs b/src/test/ui/proc-macro/auxiliary/dollar-crate-external.rs
deleted file mode 100644
index bdcdb7922..000000000
--- a/src/test/ui/proc-macro/auxiliary/dollar-crate-external.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-pub type S = u8;
-
-#[macro_export]
-macro_rules! external {
- () => {
- print_bang! {
- struct M($crate::S);
- }
-
- #[print_attr]
- struct A($crate::S);
-
- #[derive(Print)]
- struct D($crate::S);
- };
-}
-
-#[macro_export]
-macro_rules! issue_62325 { () => {
- #[print_attr]
- struct B(identity!($crate::S));
-}}
diff --git a/src/test/ui/proc-macro/auxiliary/double.rs b/src/test/ui/proc-macro/auxiliary/double.rs
deleted file mode 100644
index 99eb4e375..000000000
--- a/src/test/ui/proc-macro/auxiliary/double.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_quote)]
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-// Outputs another copy of the struct. Useful for testing the tokens
-// seen by the proc_macro.
-#[proc_macro_derive(Double)]
-pub fn derive(input: TokenStream) -> TokenStream {
- quote!(mod foo { $input })
-}
diff --git a/src/test/ui/proc-macro/auxiliary/duplicate.rs b/src/test/ui/proc-macro/auxiliary/duplicate.rs
deleted file mode 100644
index b8f82b46f..000000000
--- a/src/test/ui/proc-macro/auxiliary/duplicate.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![deny(unused)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro_attribute]
-pub fn duplicate(attr: TokenStream, item: TokenStream) -> TokenStream {
- let mut new_name = Some(attr.into_iter().nth(0).unwrap());
- let mut encountered_idents = 0;
- let input = item.to_string();
- let ret = item
- .into_iter()
- .map(move |token| match token {
- TokenTree::Ident(_) if encountered_idents == 1 => {
- encountered_idents += 1;
- new_name.take().unwrap()
- }
- TokenTree::Ident(_) => {
- encountered_idents += 1;
- token
- }
- _ => token,
- })
- .collect::<TokenStream>();
- let mut input_again = input.parse::<TokenStream>().unwrap();
- input_again.extend(ret);
- input_again
-}
diff --git a/src/test/ui/proc-macro/auxiliary/edition-imports-2015.rs b/src/test/ui/proc-macro/auxiliary/edition-imports-2015.rs
deleted file mode 100644
index 27c59b805..000000000
--- a/src/test/ui/proc-macro/auxiliary/edition-imports-2015.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// edition:2015
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Derive2015)]
-pub fn derive_2015(_: TokenStream) -> TokenStream {
- "
- use import::Path;
-
- fn check_absolute() {
- let x = ::absolute::Path;
- }
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/empty-crate.rs b/src/test/ui/proc-macro/auxiliary/empty-crate.rs
deleted file mode 100644
index 1cf7534b2..000000000
--- a/src/test/ui/proc-macro/auxiliary/empty-crate.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![deny(unused_variables)]
diff --git a/src/test/ui/proc-macro/auxiliary/expand-expr.rs b/src/test/ui/proc-macro/auxiliary/expand-expr.rs
deleted file mode 100644
index 1d6ef8a13..000000000
--- a/src/test/ui/proc-macro/auxiliary/expand-expr.rs
+++ /dev/null
@@ -1,166 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![deny(warnings)]
-#![feature(proc_macro_expand, proc_macro_span)]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-use std::str::FromStr;
-
-// Flatten the TokenStream, removing any toplevel `Delimiter::None`s for
-// comparison.
-fn flatten(ts: TokenStream) -> Vec<TokenTree> {
- ts.into_iter()
- .flat_map(|tt| match &tt {
- TokenTree::Group(group) if group.delimiter() == Delimiter::None => {
- flatten(group.stream())
- }
- _ => vec![tt],
- })
- .collect()
-}
-
-// Assert that two TokenStream values are roughly equal to one-another.
-fn assert_ts_eq(lhs: &TokenStream, rhs: &TokenStream) {
- let ltts = flatten(lhs.clone());
- let rtts = flatten(rhs.clone());
-
- if ltts.len() != rtts.len() {
- panic!(
- "expected the same number of tts ({} == {})\nlhs:\n{:#?}\nrhs:\n{:#?}",
- ltts.len(),
- rtts.len(),
- lhs,
- rhs
- )
- }
-
- for (ltt, rtt) in ltts.iter().zip(&rtts) {
- match (ltt, rtt) {
- (TokenTree::Group(l), TokenTree::Group(r)) => {
- assert_eq!(
- l.delimiter(),
- r.delimiter(),
- "expected delimiters to match for {:?} and {:?}",
- l,
- r
- );
- assert_ts_eq(&l.stream(), &r.stream());
- }
- (TokenTree::Punct(l), TokenTree::Punct(r)) => assert_eq!(
- (l.as_char(), l.spacing()),
- (r.as_char(), r.spacing()),
- "expected punct to match for {:?} and {:?}",
- l,
- r
- ),
- (TokenTree::Ident(l), TokenTree::Ident(r)) => assert_eq!(
- l.to_string(),
- r.to_string(),
- "expected ident to match for {:?} and {:?}",
- l,
- r
- ),
- (TokenTree::Literal(l), TokenTree::Literal(r)) => assert_eq!(
- l.to_string(),
- r.to_string(),
- "expected literal to match for {:?} and {:?}",
- l,
- r
- ),
- (l, r) => panic!("expected type to match for {:?} and {:?}", l, r),
- }
- }
-}
-
-#[proc_macro]
-pub fn expand_expr_is(input: TokenStream) -> TokenStream {
- let mut iter = input.into_iter();
- let mut expected_tts = Vec::new();
- let comma = loop {
- match iter.next() {
- Some(TokenTree::Punct(p)) if p.as_char() == ',' => break p,
- Some(tt) => expected_tts.push(tt),
- None => panic!("expected comma"),
- }
- };
-
- // Make sure that `Ident` and `Literal` objects from this proc-macro's
- // environment are not invalidated when `expand_expr` recursively invokes
- // another macro by taking a local copy, and checking it after the fact.
- let pre_expand_span = comma.span();
- let pre_expand_ident = Ident::new("ident", comma.span());
- let pre_expand_literal = Literal::string("literal");
- let pre_expand_call_site = Span::call_site();
-
- let expected = expected_tts.into_iter().collect::<TokenStream>();
- let expanded = iter.collect::<TokenStream>().expand_expr().expect("expand_expr failed");
- assert!(
- expected.to_string() == expanded.to_string(),
- "assert failed\nexpected: `{}`\nexpanded: `{}`",
- expected.to_string(),
- expanded.to_string()
- );
-
- // Also compare the raw tts to make sure they line up.
- assert_ts_eq(&expected, &expanded);
-
- assert!(comma.span().eq(&pre_expand_span), "pre-expansion span is still equal");
- assert_eq!(pre_expand_ident.to_string(), "ident", "pre-expansion identifier is still valid");
- assert_eq!(
- pre_expand_literal.to_string(),
- "\"literal\"",
- "pre-expansion literal is still valid"
- );
- assert!(Span::call_site().eq(&pre_expand_call_site), "pre-expansion call-site is still equal");
-
- TokenStream::new()
-}
-
-#[proc_macro]
-pub fn expand_expr_fail(input: TokenStream) -> TokenStream {
- match input.expand_expr() {
- Ok(ts) => panic!("expand_expr unexpectedly succeeded: `{}`", ts),
- Err(_) => TokenStream::new(),
- }
-}
-
-#[proc_macro]
-pub fn check_expand_expr_file(ts: TokenStream) -> TokenStream {
- // Check that the passed in `file!()` invocation and a parsed `file!`
- // invocation expand to the same literal.
- let input_t = ts.expand_expr().expect("expand_expr failed on macro input").to_string();
- let parse_t = TokenStream::from_str("file!{}")
- .unwrap()
- .expand_expr()
- .expect("expand_expr failed on internal macro")
- .to_string();
- assert_eq!(input_t, parse_t);
-
- // Check that the literal matches `Span::call_site().source_file().path()`
- let expect_t =
- Literal::string(&Span::call_site().source_file().path().to_string_lossy()).to_string();
- assert_eq!(input_t, expect_t);
-
- TokenStream::new()
-}
-
-#[proc_macro]
-pub fn recursive_expand(_: TokenStream) -> TokenStream {
- // Recursively call until we hit the recursion limit and get an error.
- //
- // NOTE: This doesn't panic if expansion fails because that'll cause a very
- // large number of errors to fill the output.
- TokenStream::from_str("recursive_expand!{}")
- .unwrap()
- .expand_expr()
- .unwrap_or(std::iter::once(TokenTree::Literal(Literal::u32_suffixed(0))).collect())
-}
-
-#[proc_macro]
-pub fn echo_pm(input: TokenStream) -> TokenStream {
- input
-}
diff --git a/src/test/ui/proc-macro/auxiliary/expand-with-a-macro.rs b/src/test/ui/proc-macro/auxiliary/expand-with-a-macro.rs
deleted file mode 100644
index d779d57af..000000000
--- a/src/test/ui/proc-macro/auxiliary/expand-with-a-macro.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![deny(warnings)]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(A)]
-pub fn derive(input: TokenStream) -> TokenStream {
- let input = input.to_string();
- assert!(input.contains("struct A ;"));
- r#"
- impl A {
- fn a(&self) {
- panic!("hello");
- }
- }
- "#.parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/external-crate-var.rs b/src/test/ui/proc-macro/auxiliary/external-crate-var.rs
deleted file mode 100644
index 4319e9212..000000000
--- a/src/test/ui/proc-macro/auxiliary/external-crate-var.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-pub struct ExternFoo;
-
-pub trait ExternTrait {
- const CONST: u32;
- type Assoc;
-}
-
-impl ExternTrait for ExternFoo {
- const CONST: u32 = 0;
- type Assoc = ExternFoo;
-}
-
-#[macro_export]
-macro_rules! external { () => {
- mod bar {
- #[derive(Double)]
- struct Bar($crate::ExternFoo);
- }
-
- mod qself {
- #[derive(Double)]
- struct QSelf(<$crate::ExternFoo as $crate::ExternTrait>::Assoc);
- }
-
- mod qself_recurse {
- #[derive(Double)]
- struct QSelfRecurse(<
- <$crate::ExternFoo as $crate::ExternTrait>::Assoc
- as $crate::ExternTrait>::Assoc
- );
- }
-
- mod qself_in_const {
- #[derive(Double)]
- #[repr(u32)]
- enum QSelfInConst {
- Variant = <$crate::ExternFoo as $crate::ExternTrait>::CONST,
- }
- }
-} }
diff --git a/src/test/ui/proc-macro/auxiliary/first-second.rs b/src/test/ui/proc-macro/auxiliary/first-second.rs
deleted file mode 100644
index 6331608fb..000000000
--- a/src/test/ui/proc-macro/auxiliary/first-second.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Group, Delimiter};
-
-#[proc_macro_attribute]
-pub fn first(_attr: TokenStream, item: TokenStream) -> TokenStream {
- let tokens: TokenStream = "#[derive(Second)]".parse().unwrap();
- let wrapped = TokenTree::Group(Group::new(Delimiter::None, item.into_iter().collect()));
- tokens.into_iter().chain(std::iter::once(wrapped)).collect()
-}
-
-#[proc_macro_derive(Second)]
-pub fn second(item: TokenStream) -> TokenStream {
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/gen-lifetime-token.rs b/src/test/ui/proc-macro/auxiliary/gen-lifetime-token.rs
deleted file mode 100644
index d1a1c584f..000000000
--- a/src/test/ui/proc-macro/auxiliary/gen-lifetime-token.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro]
-pub fn bar(_input: TokenStream) -> TokenStream {
- let mut ret = Vec::<TokenTree>::new();
- ret.push(Ident::new("static", Span::call_site()).into());
- ret.push(Ident::new("FOO", Span::call_site()).into());
- ret.push(Punct::new(':', Spacing::Alone).into());
- ret.push(Punct::new('&', Spacing::Alone).into());
- ret.push(Punct::new('\'', Spacing::Joint).into());
- ret.push(Ident::new("static", Span::call_site()).into());
- ret.push(Ident::new("i32", Span::call_site()).into());
- ret.push(Punct::new('=', Spacing::Alone).into());
- ret.push(Punct::new('&', Spacing::Alone).into());
- ret.push(Literal::i32_unsuffixed(1).into());
- ret.push(Punct::new(';', Spacing::Alone).into());
- ret.into_iter().collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs b/src/test/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs
deleted file mode 100644
index 548fefe76..000000000
--- a/src/test/ui/proc-macro/auxiliary/gen-macro-rules-hygiene.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn gen_macro_rules(_: TokenStream) -> TokenStream {
- "
- macro_rules! generated {() => {
- struct ItemDef;
- let local_def = 0;
-
- ItemUse; // OK
- local_use; // ERROR
- break 'label_use; // ERROR
-
- type DollarCrate = $crate::ItemUse; // OK
- }}
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/gen-macro-rules.rs b/src/test/ui/proc-macro/auxiliary/gen-macro-rules.rs
deleted file mode 100644
index d4b67d6b0..000000000
--- a/src/test/ui/proc-macro/auxiliary/gen-macro-rules.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(repro)]
-pub fn proc_macro_hack_expr(_input: TokenStream) -> TokenStream {
- "macro_rules! m {()=>{}}".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs b/src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs
deleted file mode 100644
index 3f3e12eed..000000000
--- a/src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_quote)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn dollar_ident(input: TokenStream) -> TokenStream {
- let black_hole = input.into_iter().next().unwrap();
- quote! {
- $black_hole!($$var);
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/generate-mod.rs b/src/test/ui/proc-macro/auxiliary/generate-mod.rs
deleted file mode 100644
index e950f7d62..000000000
--- a/src/test/ui/proc-macro/auxiliary/generate-mod.rs
+++ /dev/null
@@ -1,58 +0,0 @@
-// run-pass
-// force-host
-// no-prefer-dynamic
-// ignore-pass
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn check(_: TokenStream) -> TokenStream {
- "
- type Alias = FromOutside; // OK
- struct Outer;
- mod inner {
- type Alias = FromOutside; // `FromOutside` shouldn't be available from here
- type Inner = Outer; // `Outer` shouldn't be available from here
- }
- ".parse().unwrap()
-}
-
-#[proc_macro_attribute]
-pub fn check_attr(_: TokenStream, _: TokenStream) -> TokenStream {
- "
- type AliasAttr = FromOutside; // OK
- struct OuterAttr;
- mod inner_attr {
- type Alias = FromOutside; // `FromOutside` shouldn't be available from here
- type Inner = OuterAttr; // `OuterAttr` shouldn't be available from here
- }
- ".parse().unwrap()
-}
-
-#[proc_macro_derive(CheckDerive)]
-pub fn check_derive(_: TokenStream) -> TokenStream {
- "
- type AliasDerive = FromOutside; // OK
- struct OuterDerive;
- mod inner_derive {
- type Alias = FromOutside; // `FromOutside` shouldn't be available from here
- type Inner = OuterDerive; // `OuterDerive` shouldn't be available from here
- }
- ".parse().unwrap()
-}
-
-#[proc_macro_derive(CheckDeriveLint)]
-pub fn check_derive_lint(_: TokenStream) -> TokenStream {
- "
- type AliasDeriveLint = FromOutside; // OK
- struct OuterDeriveLint;
- #[allow(proc_macro_derive_resolution_fallback)]
- mod inner_derive_lint {
- type Alias = FromOutside; // `FromOutside` shouldn't be available from here
- type Inner = OuterDeriveLint; // `OuterDeriveLint` shouldn't be available from here
- }
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/hygiene_example.rs b/src/test/ui/proc-macro/auxiliary/hygiene_example.rs
deleted file mode 100644
index f7e7e0b57..000000000
--- a/src/test/ui/proc-macro/auxiliary/hygiene_example.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-extern crate hygiene_example_codegen;
-
-pub use hygiene_example_codegen::hello;
-
-pub fn print(string: &str) {
- println!("{}", string);
-}
diff --git a/src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs b/src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs
deleted file mode 100644
index 2bd4d3336..000000000
--- a/src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_quote)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro as proc_macro_renamed; // This does not break `quote!`
-
-use proc_macro_renamed::{TokenStream, quote};
-
-#[proc_macro]
-pub fn hello(input: TokenStream) -> TokenStream {
- quote!(hello_helper!($input))
- //^ `hello_helper!` always resolves to the following proc macro,
- //| no matter where `hello!` is used.
-}
-
-#[proc_macro]
-pub fn hello_helper(input: TokenStream) -> TokenStream {
- quote! {
- extern crate hygiene_example; // This is never a conflict error
- let string = format!("hello {}", $input);
- //^ `format!` always resolves to the prelude macro,
- //| even if a different `format!` is in scope where `hello!` is used.
- hygiene_example::print(&string)
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/included-file.txt b/src/test/ui/proc-macro/auxiliary/included-file.txt
deleted file mode 100644
index b4720047d..000000000
--- a/src/test/ui/proc-macro/auxiliary/included-file.txt
+++ /dev/null
@@ -1 +0,0 @@
-Included file contents
diff --git a/src/test/ui/proc-macro/auxiliary/invalid-punct-ident.rs b/src/test/ui/proc-macro/auxiliary/invalid-punct-ident.rs
deleted file mode 100644
index 518dfd0d6..000000000
--- a/src/test/ui/proc-macro/auxiliary/invalid-punct-ident.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_raw_ident)]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn invalid_punct(_: TokenStream) -> TokenStream {
- TokenTree::from(Punct::new('`', Spacing::Alone)).into()
-}
-
-#[proc_macro]
-pub fn invalid_ident(_: TokenStream) -> TokenStream {
- TokenTree::from(Ident::new("*", Span::call_site())).into()
-}
-
-#[proc_macro]
-pub fn invalid_raw_ident(_: TokenStream) -> TokenStream {
- TokenTree::from(Ident::new_raw("self", Span::call_site())).into()
-}
-
-#[proc_macro]
-pub fn lexer_failure(_: TokenStream) -> TokenStream {
- "a b ) c".parse().expect("parsing failed without panic")
-}
diff --git a/src/test/ui/proc-macro/auxiliary/is-available.rs b/src/test/ui/proc-macro/auxiliary/is-available.rs
deleted file mode 100644
index 03f5265e3..000000000
--- a/src/test/ui/proc-macro/auxiliary/is-available.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::{Literal, TokenStream, TokenTree};
-
-#[proc_macro]
-pub fn from_inside_proc_macro(_input: TokenStream) -> TokenStream {
- proc_macro::is_available().to_string().parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-104884.rs b/src/test/ui/proc-macro/auxiliary/issue-104884.rs
deleted file mode 100644
index 0de59d005..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-104884.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(AddImpl)]
-
-pub fn derive(input: TokenStream) -> TokenStream {
- "use std::cmp::Ordering;
-
- impl<T> Ord for PriorityQueue<T> {
- fn cmp(&self, other: &Self) -> Ordering {
- self.0.cmp(&self.height)
- }
- }
- "
- .parse()
- .unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-38586.rs b/src/test/ui/proc-macro/auxiliary/issue-38586.rs
deleted file mode 100644
index f3a19081c..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-38586.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-#[proc_macro_derive(A)]
-pub fn derive_a(_: proc_macro::TokenStream) -> proc_macro::TokenStream {
- "fn f() { println!(\"{}\", foo); }".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-39889.rs b/src/test/ui/proc-macro/auxiliary/issue-39889.rs
deleted file mode 100644
index e7af66da7..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-39889.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Issue39889)]
-pub fn f(_input: TokenStream) -> TokenStream {
- let rules = r#"
- macro_rules! id {
- ($($tt:tt)*) => { $($tt)* };
- }
- "#;
- rules.parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-42708.rs b/src/test/ui/proc-macro/auxiliary/issue-42708.rs
deleted file mode 100644
index dae05204b..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-42708.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Test)]
-pub fn derive(_input: TokenStream) -> TokenStream {
- "fn f(s: S) { s.x }".parse().unwrap()
-}
-
-#[proc_macro_attribute]
-pub fn attr_test(_attr: TokenStream, input: TokenStream) -> TokenStream {
- input
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-50061.rs b/src/test/ui/proc-macro/auxiliary/issue-50061.rs
deleted file mode 100644
index f5fe8cabb..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-50061.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn check(_a: TokenStream, b: TokenStream) -> TokenStream {
- b.into_iter().collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-50493.rs b/src/test/ui/proc-macro/auxiliary/issue-50493.rs
deleted file mode 100644
index f72024948..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-50493.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Derive)]
-pub fn derive(_: TokenStream) -> TokenStream {
- let code = "
- fn one(r: Restricted) {
- r.field;
- }
- fn two(r: Restricted) {
- r.field;
- }
- ";
-
- code.parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-59191.rs b/src/test/ui/proc-macro/auxiliary/issue-59191.rs
deleted file mode 100644
index d9ee77067..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-59191.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// edition:2018
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn no_main(_attrs: TokenStream, _input: TokenStream) -> TokenStream {
- let new_krate = r#"
- fn main() {}
- "#;
- new_krate.parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-66286.rs b/src/test/ui/proc-macro/auxiliary/issue-66286.rs
deleted file mode 100644
index 6217f1c7e..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-66286.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn vec_ice(_attr: TokenStream, input: TokenStream) -> TokenStream {
- // This redundant convert is necessary to reproduce ICE.
- input.into_iter().collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-75801.rs b/src/test/ui/proc-macro/auxiliary/issue-75801.rs
deleted file mode 100644
index d6c031d7d..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-75801.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn foo(_args: TokenStream, item: TokenStream) -> TokenStream {
- item
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-79242.rs b/src/test/ui/proc-macro/auxiliary/issue-79242.rs
deleted file mode 100644
index e586980f0..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-79242.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn dummy(input: TokenStream) -> TokenStream {
- // Iterate to force internal conversion of nonterminals
- // to `proc_macro` structs
- for _ in input {}
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-79825.rs b/src/test/ui/proc-macro/auxiliary/issue-79825.rs
deleted file mode 100644
index 930891b1d..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-79825.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// force-host
-// no-prefer-dynamic
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_attribute]
-pub fn assert_input(args: TokenStream, input: TokenStream) -> TokenStream {
- assert_eq!(input.to_string(), "trait Alias = Sized ;");
- assert!(args.is_empty());
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-83510.rs b/src/test/ui/proc-macro/auxiliary/issue-83510.rs
deleted file mode 100644
index 1d6ef3914..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-83510.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn dance_like_you_want_to_ice(_: TokenStream) -> TokenStream {
- r#"
- impl Foo {
- type Bar = Box<()> + Baz;
- }
- "#
- .parse()
- .unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/issue-91800-macro.rs b/src/test/ui/proc-macro/auxiliary/issue-91800-macro.rs
deleted file mode 100644
index 958a8bed9..000000000
--- a/src/test/ui/proc-macro/auxiliary/issue-91800-macro.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-fn compile_error() -> TokenStream {
- r#"compile_error!("")"#.parse().unwrap()
-}
-
-#[proc_macro_derive(MyTrait)]
-pub fn derive(input: TokenStream) -> TokenStream {
- compile_error()
-}
-#[proc_macro_attribute]
-pub fn attribute_macro(_attr: TokenStream, mut input: TokenStream) -> TokenStream {
- input.extend(compile_error());
- input
-}
-#[proc_macro]
-pub fn fn_macro(_item: TokenStream) -> TokenStream {
- compile_error()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/lifetimes-rpass.rs b/src/test/ui/proc-macro/auxiliary/lifetimes-rpass.rs
deleted file mode 100644
index 4e5d22e6e..000000000
--- a/src/test/ui/proc-macro/auxiliary/lifetimes-rpass.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro]
-pub fn lifetimes_bang(input: TokenStream) -> TokenStream {
- // Roundtrip through token trees
- input.into_iter().collect()
-}
-
-#[proc_macro_attribute]
-pub fn lifetimes_attr(_: TokenStream, input: TokenStream) -> TokenStream {
- // Roundtrip through AST
- input
-}
-
-#[proc_macro_derive(Lifetimes)]
-pub fn lifetimes_derive(input: TokenStream) -> TokenStream {
- // Roundtrip through a string
- format!("mod m {{ {} }}", input).parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/lifetimes.rs b/src/test/ui/proc-macro/auxiliary/lifetimes.rs
deleted file mode 100644
index 212164dd2..000000000
--- a/src/test/ui/proc-macro/auxiliary/lifetimes.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro]
-pub fn single_quote_alone(_: TokenStream) -> TokenStream {
- // `&'a u8`, but the `'` token is not joint
- let trees: Vec<TokenTree> = vec![
- Punct::new('&', Spacing::Alone).into(),
- Punct::new('\'', Spacing::Alone).into(),
- Ident::new("a", Span::call_site()).into(),
- Ident::new("u8", Span::call_site()).into(),
- ];
- trees.into_iter().collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/macro-only-syntax.rs b/src/test/ui/proc-macro/auxiliary/macro-only-syntax.rs
deleted file mode 100644
index c72306c3d..000000000
--- a/src/test/ui/proc-macro/auxiliary/macro-only-syntax.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-// These are tests for syntax that is accepted by the Rust parser but
-// unconditionally rejected semantically after macro expansion. Attribute macros
-// are permitted to accept such syntax as long as they replace it with something
-// that makes sense to Rust.
-//
-// We also inspect some of the spans to verify the syntax is not triggering the
-// lossy string reparse hack (https://github.com/rust-lang/rust/issues/43081).
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_span)]
-
-extern crate proc_macro;
-use proc_macro::{token_stream, Delimiter, TokenStream, TokenTree};
-use std::path::Component;
-
-// unsafe mod m {
-// pub unsafe mod inner;
-// }
-#[proc_macro_attribute]
-pub fn expect_unsafe_mod(_attrs: TokenStream, input: TokenStream) -> TokenStream {
- let tokens = &mut input.into_iter();
- expect(tokens, "unsafe");
- expect(tokens, "mod");
- expect(tokens, "m");
- let tokens = &mut expect_brace(tokens);
- expect(tokens, "pub");
- expect(tokens, "unsafe");
- expect(tokens, "mod");
- let ident = expect(tokens, "inner");
- expect(tokens, ";");
- check_useful_span(ident, "unsafe-mod.rs");
- TokenStream::new()
-}
-
-// unsafe extern {
-// type T;
-// }
-#[proc_macro_attribute]
-pub fn expect_unsafe_foreign_mod(_attrs: TokenStream, input: TokenStream) -> TokenStream {
- let tokens = &mut input.into_iter();
- expect(tokens, "unsafe");
- expect(tokens, "extern");
- let tokens = &mut expect_brace(tokens);
- expect(tokens, "type");
- let ident = expect(tokens, "T");
- expect(tokens, ";");
- check_useful_span(ident, "unsafe-foreign-mod.rs");
- TokenStream::new()
-}
-
-// unsafe extern "C++" {}
-#[proc_macro_attribute]
-pub fn expect_unsafe_extern_cpp_mod(_attrs: TokenStream, input: TokenStream) -> TokenStream {
- let tokens = &mut input.into_iter();
- expect(tokens, "unsafe");
- expect(tokens, "extern");
- let abi = expect(tokens, "\"C++\"");
- expect_brace(tokens);
- check_useful_span(abi, "unsafe-foreign-mod.rs");
- TokenStream::new()
-}
-
-fn expect(tokens: &mut token_stream::IntoIter, expected: &str) -> TokenTree {
- match tokens.next() {
- Some(token) if token.to_string() == expected => token,
- wrong => panic!("unexpected token: {:?}, expected `{}`", wrong, expected),
- }
-}
-
-fn expect_brace(tokens: &mut token_stream::IntoIter) -> token_stream::IntoIter {
- match tokens.next() {
- Some(TokenTree::Group(group)) if group.delimiter() == Delimiter::Brace => {
- group.stream().into_iter()
- }
- wrong => panic!("unexpected token: {:?}, expected `{{`", wrong),
- }
-}
-
-fn check_useful_span(token: TokenTree, expected_filename: &str) {
- let span = token.span();
- assert!(span.start().column < span.end().column);
-
- let source_path = span.source_file().path();
- let filename = source_path.components().last().unwrap();
- assert_eq!(filename, Component::Normal(expected_filename.as_ref()));
-}
diff --git a/src/test/ui/proc-macro/auxiliary/make-macro.rs b/src/test/ui/proc-macro/auxiliary/make-macro.rs
deleted file mode 100644
index 3c851b6de..000000000
--- a/src/test/ui/proc-macro/auxiliary/make-macro.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// force-host
-
-#[macro_export]
-macro_rules! make_it {
- ($name:ident) => {
- #[proc_macro]
- pub fn $name(input: TokenStream) -> TokenStream {
- println!("Def site: {:?}", Span::def_site());
- println!("Input: {:?}", input);
- let new: TokenStream = input.into_iter().map(|mut t| {
- t.set_span(Span::def_site());
- t
- }).collect();
- println!("Respanned: {:?}", new);
- new
- }
- };
-}
diff --git a/src/test/ui/proc-macro/auxiliary/meta-delim.rs b/src/test/ui/proc-macro/auxiliary/meta-delim.rs
deleted file mode 100644
index 54e3d7857..000000000
--- a/src/test/ui/proc-macro/auxiliary/meta-delim.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-macro_rules! produce_it {
- ($dollar_one:tt $foo:ident $my_name:ident) => {
- #[macro_export]
- macro_rules! meta_delim {
- ($dollar_one ($dollar_one $my_name:ident)*) => {
- stringify!($dollar_one ($dollar_one $my_name)*)
- }
- }
- }
-}
-
-produce_it!($my_name name);
diff --git a/src/test/ui/proc-macro/auxiliary/meta-macro.rs b/src/test/ui/proc-macro/auxiliary/meta-macro.rs
deleted file mode 100644
index 0a9b9887d..000000000
--- a/src/test/ui/proc-macro/auxiliary/meta-macro.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-// edition:2018
-
-#![feature(proc_macro_def_site)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-extern crate make_macro;
-use proc_macro::{TokenStream, Span};
-
-make_macro::make_it!(print_def_site);
-
-#[proc_macro]
-pub fn dummy(input: TokenStream) -> TokenStream { input }
diff --git a/src/test/ui/proc-macro/auxiliary/mixed-site-span.rs b/src/test/ui/proc-macro/auxiliary/mixed-site-span.rs
deleted file mode 100644
index c2a498700..000000000
--- a/src/test/ui/proc-macro/auxiliary/mixed-site-span.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_quote)]
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn proc_macro_rules(input: TokenStream) -> TokenStream {
- if input.is_empty() {
- let id = |s| TokenTree::from(Ident::new(s, Span::mixed_site()));
- let item_def = id("ItemDef");
- let local_def = id("local_def");
- let item_use = id("ItemUse");
- let local_use = id("local_use");
- let mut single_quote = Punct::new('\'', Spacing::Joint);
- single_quote.set_span(Span::mixed_site());
- let label_use: TokenStream = [
- TokenTree::from(single_quote),
- id("label_use"),
- ].iter().cloned().collect();
- quote!(
- struct $item_def;
- let $local_def = 0;
-
- $item_use; // OK
- $local_use; // ERROR
- break $label_use; // ERROR
- )
- } else {
- let mut dollar_crate = input.into_iter().next().unwrap();
- dollar_crate.set_span(Span::mixed_site());
- quote!(
- type A = $dollar_crate::ItemUse;
- )
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/modify-ast.rs b/src/test/ui/proc-macro/auxiliary/modify-ast.rs
deleted file mode 100644
index cc582c152..000000000
--- a/src/test/ui/proc-macro/auxiliary/modify-ast.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro_attribute]
-pub fn assert1(_a: TokenStream, b: TokenStream) -> TokenStream {
- assert_eq(b.clone(), "pub fn foo() {}".parse().unwrap());
- b
-}
-
-#[proc_macro_derive(Foo, attributes(foo))]
-pub fn assert2(a: TokenStream) -> TokenStream {
- assert_eq(a, "pub struct MyStructc { _a: i32, }".parse().unwrap());
- TokenStream::new()
-}
-
-fn assert_eq(a: TokenStream, b: TokenStream) {
- let mut a = a.into_iter();
- let mut b = b.into_iter();
- for (a, b) in a.by_ref().zip(&mut b) {
- match (a, b) {
- (TokenTree::Group(a), TokenTree::Group(b)) => {
- assert_eq!(a.delimiter(), b.delimiter());
- assert_eq(a.stream(), b.stream());
- }
- (TokenTree::Punct(a), TokenTree::Punct(b)) => {
- assert_eq!(a.as_char(), b.as_char());
- assert_eq!(a.spacing(), b.spacing());
- }
- (TokenTree::Literal(a), TokenTree::Literal(b)) => {
- assert_eq!(a.to_string(), b.to_string());
- }
- (TokenTree::Ident(a), TokenTree::Ident(b)) => {
- assert_eq!(a.to_string(), b.to_string());
- }
- (a, b) => panic!("{:?} != {:?}", a, b),
- }
- }
-
- assert!(a.next().is_none());
- assert!(b.next().is_none());
-}
diff --git a/src/test/ui/proc-macro/auxiliary/multiple-derives.rs b/src/test/ui/proc-macro/auxiliary/multiple-derives.rs
deleted file mode 100644
index e3f6607b2..000000000
--- a/src/test/ui/proc-macro/auxiliary/multiple-derives.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-macro_rules! make_derives {
- ($($name:ident),*) => {
- $(
- #[proc_macro_derive($name)]
- pub fn $name(input: TokenStream) -> TokenStream {
- println!("Derive {}: {}", stringify!($name), input);
- TokenStream::new()
- }
- )*
- }
-}
-
-make_derives!(First, Second, Third, Fourth, Fifth);
diff --git a/src/test/ui/proc-macro/auxiliary/multispan.rs b/src/test/ui/proc-macro/auxiliary/multispan.rs
deleted file mode 100644
index c05d15643..000000000
--- a/src/test/ui/proc-macro/auxiliary/multispan.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Span, Diagnostic};
-
-fn parse(input: TokenStream) -> Result<(), Diagnostic> {
- let mut hi_spans = vec![];
- for tree in input {
- if let TokenTree::Ident(ref ident) = tree {
- if ident.to_string() == "hi" {
- hi_spans.push(ident.span());
- }
- }
- }
-
- if !hi_spans.is_empty() {
- return Err(Span::def_site()
- .error("hello to you, too!")
- .span_note(hi_spans, "found these 'hi's"));
- }
-
- Ok(())
-}
-
-#[proc_macro]
-pub fn hello(input: TokenStream) -> TokenStream {
- if let Err(diag) = parse(input) {
- diag.emit();
- }
-
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/negative-token.rs b/src/test/ui/proc-macro/auxiliary/negative-token.rs
deleted file mode 100644
index 8b89f2e37..000000000
--- a/src/test/ui/proc-macro/auxiliary/negative-token.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro]
-pub fn neg_one(_input: TokenStream) -> TokenStream {
- TokenTree::Literal(Literal::i32_suffixed(-1)).into()
-}
-
-#[proc_macro]
-pub fn neg_one_float(_input: TokenStream) -> TokenStream {
- TokenTree::Literal(Literal::f32_suffixed(-1.0)).into()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/nested-macro-rules.rs b/src/test/ui/proc-macro/auxiliary/nested-macro-rules.rs
deleted file mode 100644
index 27676a5cb..000000000
--- a/src/test/ui/proc-macro/auxiliary/nested-macro-rules.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-pub struct FirstStruct;
-
-#[macro_export]
-macro_rules! outer_macro {
- ($name:ident, $attr_struct_name:ident) => {
- #[macro_export]
- macro_rules! inner_macro {
- ($bang_macro:ident, $attr_macro:ident) => {
- $bang_macro!($name);
- #[$attr_macro] struct $attr_struct_name {}
- }
- }
- }
-}
-
-outer_macro!(FirstStruct, FirstAttrStruct);
diff --git a/src/test/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs b/src/test/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs
deleted file mode 100644
index ea5ff4665..000000000
--- a/src/test/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_quote)]
-
-extern crate proc_macro;
-use proc_macro::{TokenStream, quote};
-
-#[proc_macro_attribute]
-pub fn first_attr(_: TokenStream, input: TokenStream) -> TokenStream {
- let recollected: TokenStream = input.into_iter().collect();
- println!("First recollected: {:#?}", recollected);
- quote! {
- #[second_attr]
- $recollected
- }
-}
-
-#[proc_macro_attribute]
-pub fn second_attr(_: TokenStream, input: TokenStream) -> TokenStream {
- let recollected: TokenStream = input.into_iter().collect();
- println!("Second recollected: {:#?}", recollected);
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/not-joint.rs b/src/test/ui/proc-macro/auxiliary/not-joint.rs
deleted file mode 100644
index e6c09f762..000000000
--- a/src/test/ui/proc-macro/auxiliary/not-joint.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-#[proc_macro]
-pub fn tokens(input: TokenStream) -> TokenStream {
- assert_nothing_joint(input);
- TokenStream::new()
-}
-
-#[proc_macro_attribute]
-pub fn nothing(_: TokenStream, input: TokenStream) -> TokenStream {
- assert_nothing_joint(input);
- TokenStream::new()
-}
-
-fn assert_nothing_joint(s: TokenStream) {
- for tt in s {
- match tt {
- TokenTree::Group(g) => assert_nothing_joint(g.stream()),
- TokenTree::Punct(p) => assert_eq!(p.spacing(), Spacing::Alone),
- _ => {}
- }
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/parent-source-spans.rs b/src/test/ui/proc-macro/auxiliary/parent-source-spans.rs
deleted file mode 100644
index 594f10883..000000000
--- a/src/test/ui/proc-macro/auxiliary/parent-source-spans.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_diagnostic, proc_macro_span)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Span};
-
-fn lit_span(tt: TokenTree) -> (Span, String) {
- match tt {
- TokenTree::Literal(..) |
- TokenTree::Group(..) => (tt.span(), tt.to_string().trim().into()),
- _ => panic!("expected a literal in token tree, got: {:?}", tt)
- }
-}
-
-#[proc_macro]
-pub fn parent_source_spans(input: TokenStream) -> TokenStream {
- let mut tokens = input.into_iter();
- let (sp1, str1) = lit_span(tokens.next().expect("first string"));
- let _ = tokens.next();
- let (sp2, str2) = lit_span(tokens.next().expect("second string"));
-
- sp1.error(format!("first final: {}", str1)).emit();
- sp2.error(format!("second final: {}", str2)).emit();
-
- if let (Some(p1), Some(p2)) = (sp1.parent(), sp2.parent()) {
- p1.error(format!("first parent: {}", str1)).emit();
- p2.error(format!("second parent: {}", str2)).emit();
-
- if let (Some(gp1), Some(gp2)) = (p1.parent(), p2.parent()) {
- gp1.error(format!("first grandparent: {}", str1)).emit();
- gp2.error(format!("second grandparent: {}", str2)).emit();
- }
- }
-
- sp1.source().error(format!("first source: {}", str1)).emit();
- sp2.source().error(format!("second source: {}", str2)).emit();
-
- "ok".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/proc-macro-panic.rs b/src/test/ui/proc-macro/auxiliary/proc-macro-panic.rs
deleted file mode 100644
index fc15bb9c5..000000000
--- a/src/test/ui/proc-macro/auxiliary/proc-macro-panic.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::{TokenStream, Ident, Span};
-
-#[proc_macro]
-pub fn panic_in_libproc_macro(_: TokenStream) -> TokenStream {
- Ident::new("", Span::call_site());
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/raw-ident.rs b/src/test/ui/proc-macro/auxiliary/raw-ident.rs
deleted file mode 100644
index 9daee21aa..000000000
--- a/src/test/ui/proc-macro/auxiliary/raw-ident.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::{TokenStream, TokenTree, Ident, Punct, Spacing, Span};
-
-#[proc_macro]
-pub fn make_struct(input: TokenStream) -> TokenStream {
- match input.into_iter().next().unwrap() {
- TokenTree::Ident(ident) => {
- vec![
- TokenTree::Ident(Ident::new("struct", Span::call_site())),
- TokenTree::Ident(Ident::new_raw(&ident.to_string(), Span::call_site())),
- TokenTree::Punct(Punct::new(';', Spacing::Alone))
- ].into_iter().collect()
- }
- _ => panic!()
- }
-}
-
-#[proc_macro]
-pub fn make_bad_struct(input: TokenStream) -> TokenStream {
- match input.into_iter().next().unwrap() {
- TokenTree::Ident(ident) => {
- vec![
- TokenTree::Ident(Ident::new_raw("struct", Span::call_site())),
- TokenTree::Ident(Ident::new(&ident.to_string(), Span::call_site())),
- TokenTree::Punct(Punct::new(';', Spacing::Alone))
- ].into_iter().collect()
- }
- _ => panic!()
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/re-export.rs b/src/test/ui/proc-macro/auxiliary/re-export.rs
deleted file mode 100644
index e8e9c9d3e..000000000
--- a/src/test/ui/proc-macro/auxiliary/re-export.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn cause_ice(_: TokenStream) -> TokenStream {
- "
- enum IceCause {
- Variant,
- }
-
- pub use IceCause::Variant;
- ".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/recollect.rs b/src/test/ui/proc-macro/auxiliary/recollect.rs
deleted file mode 100644
index d4494a5af..000000000
--- a/src/test/ui/proc-macro/auxiliary/recollect.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn recollect(tokens: TokenStream) -> TokenStream {
- tokens.into_iter().collect()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/resolved-located-at.rs b/src/test/ui/proc-macro/auxiliary/resolved-located-at.rs
deleted file mode 100644
index db660824f..000000000
--- a/src/test/ui/proc-macro/auxiliary/resolved-located-at.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_def_site)]
-#![feature(proc_macro_diagnostic)]
-#![feature(proc_macro_quote)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn resolve_located_at(input: TokenStream) -> TokenStream {
- match &*input.into_iter().collect::<Vec<_>>() {
- [a, b, ..] => {
- // The error is reported at input `a`.
- let mut diag = Diagnostic::new(Level::Error, "expected error");
- diag.set_spans(Span::def_site().located_at(a.span()));
- diag.emit();
-
- // Resolves to `struct S;` at def site, but the error is reported at input `b`.
- let s = TokenTree::Ident(Ident::new("S", b.span().resolved_at(Span::def_site())));
- quote!({
- struct S;
-
- $s
- })
- }
- _ => panic!("unexpected input"),
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/span-api-tests.rs b/src/test/ui/proc-macro/auxiliary/span-api-tests.rs
deleted file mode 100644
index ad1e770a4..000000000
--- a/src/test/ui/proc-macro/auxiliary/span-api-tests.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_span)]
-
-extern crate proc_macro;
-
-use proc_macro::*;
-
-// Re-emits the input tokens by parsing them from strings
-#[proc_macro]
-pub fn reemit(input: TokenStream) -> TokenStream {
- input.to_string().parse().unwrap()
-}
-
-#[proc_macro]
-pub fn assert_fake_source_file(input: TokenStream) -> TokenStream {
- for tk in input {
- let source_file = tk.span().source_file();
- assert!(!source_file.is_real(), "Source file is real: {:?}", source_file);
- }
-
- "".parse().unwrap()
-}
-
-#[proc_macro]
-pub fn assert_source_file(input: TokenStream) -> TokenStream {
- for tk in input {
- let source_file = tk.span().source_file();
- assert!(source_file.is_real(), "Source file is not real: {:?}", source_file);
- }
-
- "".parse().unwrap()
-}
-
-#[proc_macro]
-pub fn macro_stringify(input: TokenStream) -> TokenStream {
- let mut tokens = input.into_iter();
- let first_span = tokens.next().expect("first token").span();
- let last_span = tokens.last().map(|x| x.span()).unwrap_or(first_span);
- let span = first_span.join(last_span).expect("joined span");
- let src = span.source_text().expect("source_text");
- TokenTree::Literal(Literal::string(&src)).into()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/span-from-proc-macro.rs b/src/test/ui/proc-macro/auxiliary/span-from-proc-macro.rs
deleted file mode 100644
index 49292acfe..000000000
--- a/src/test/ui/proc-macro/auxiliary/span-from-proc-macro.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(proc_macro_quote)]
-#![feature(proc_macro_internals)] // FIXME - this shouldn't be necessary
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-extern crate custom_quote;
-
-use proc_macro::{quote, TokenStream};
-
-macro_rules! expand_to_quote {
- () => {
- quote! {
- let bang_error: bool = 25;
- }
- }
-}
-
-#[proc_macro]
-pub fn error_from_bang(_input: TokenStream) -> TokenStream {
- expand_to_quote!()
-}
-
-#[proc_macro]
-pub fn other_error_from_bang(_input: TokenStream) -> TokenStream {
- custom_quote::custom_quote! {
- my_ident
- }
-}
-
-#[proc_macro_attribute]
-pub fn error_from_attribute(_args: TokenStream, _input: TokenStream) -> TokenStream {
- quote! {
- struct AttributeError {
- field: MissingType
- }
- }
-}
-
-#[proc_macro_derive(ErrorFromDerive)]
-pub fn error_from_derive(_input: TokenStream) -> TokenStream {
- quote! {
- enum DeriveError {
- Variant(OtherMissingType)
- }
- }
-}
diff --git a/src/test/ui/proc-macro/auxiliary/span-test-macros.rs b/src/test/ui/proc-macro/auxiliary/span-test-macros.rs
deleted file mode 100644
index 9a78f0a89..000000000
--- a/src/test/ui/proc-macro/auxiliary/span-test-macros.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#[macro_export]
-macro_rules! reemit_legacy {
- ($($tok:tt)*) => ($($tok)*)
-}
-
-#[macro_export]
-macro_rules! say_hello_extern {
- ($macname:ident) => ( $macname! { "Hello, world!" })
-}
diff --git a/src/test/ui/proc-macro/auxiliary/subspan.rs b/src/test/ui/proc-macro/auxiliary/subspan.rs
deleted file mode 100644
index f92adc040..000000000
--- a/src/test/ui/proc-macro/auxiliary/subspan.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_diagnostic, proc_macro_span)]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Span, Diagnostic};
-
-fn parse(input: TokenStream) -> Result<(), Diagnostic> {
- if let Some(TokenTree::Literal(lit)) = input.into_iter().next() {
- let mut spans = vec![];
- let string = lit.to_string();
- for hi in string.matches("hi") {
- let index = hi.as_ptr() as usize - string.as_ptr() as usize;
- let subspan = lit.subspan(index..(index + hi.len())).unwrap();
- spans.push(subspan);
- }
-
- if !spans.is_empty() {
- Err(Span::call_site().error("found 'hi's").span_note(spans, "here"))
- } else {
- Ok(())
- }
- } else {
- Err(Span::call_site().error("invalid input: expected string literal"))
- }
-}
-
-#[proc_macro]
-pub fn subspan(input: TokenStream) -> TokenStream {
- if let Err(diag) = parse(input) {
- diag.emit();
- }
-
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/test-macros.rs b/src/test/ui/proc-macro/auxiliary/test-macros.rs
deleted file mode 100644
index 7a46aee46..000000000
--- a/src/test/ui/proc-macro/auxiliary/test-macros.rs
+++ /dev/null
@@ -1,180 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-// Proc macros commonly used by tests.
-// `panic`/`print` -> `panic_bang`/`print_bang` to avoid conflicts with standard macros.
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::{TokenStream, TokenTree};
-
-// Macro that return empty token stream.
-
-#[proc_macro]
-pub fn empty(_: TokenStream) -> TokenStream {
- TokenStream::new()
-}
-
-#[proc_macro_attribute]
-pub fn empty_attr(_: TokenStream, _: TokenStream) -> TokenStream {
- TokenStream::new()
-}
-
-#[proc_macro_derive(Empty, attributes(empty_helper))]
-pub fn empty_derive(_: TokenStream) -> TokenStream {
- TokenStream::new()
-}
-
-// Macro that panics.
-
-#[proc_macro]
-pub fn panic_bang(_: TokenStream) -> TokenStream {
- panic!("panic-bang");
-}
-
-#[proc_macro_attribute]
-pub fn panic_attr(_: TokenStream, _: TokenStream) -> TokenStream {
- panic!("panic-attr");
-}
-
-#[proc_macro_derive(Panic, attributes(panic_helper))]
-pub fn panic_derive(_: TokenStream) -> TokenStream {
- panic!("panic-derive");
-}
-
-// Macros that return the input stream.
-
-#[proc_macro]
-pub fn identity(input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_attribute]
-pub fn identity_attr(_: TokenStream, input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_derive(Identity, attributes(identity_helper))]
-pub fn identity_derive(input: TokenStream) -> TokenStream {
- input
-}
-
-// Macros that iterate and re-collect the input stream.
-
-#[proc_macro]
-pub fn recollect(input: TokenStream) -> TokenStream {
- input.into_iter().collect()
-}
-
-#[proc_macro_attribute]
-pub fn recollect_attr(_: TokenStream, input: TokenStream) -> TokenStream {
- input.into_iter().collect()
-}
-
-#[proc_macro_derive(Recollect, attributes(recollect_helper))]
-pub fn recollect_derive(input: TokenStream) -> TokenStream {
- input.into_iter().collect()
-}
-
-// Macros that print their input in the original and re-collected forms (if they differ).
-
-fn print_helper(input: TokenStream, kind: &str) -> TokenStream {
- print_helper_ext(input, kind, true)
-}
-
-fn deep_recollect(input: TokenStream) -> TokenStream {
- input.into_iter().map(|tree| {
- match tree {
- TokenTree::Group(group) => {
- let inner = deep_recollect(group.stream());
- let mut new_group = TokenTree::Group(
- proc_macro::Group::new(group.delimiter(), inner)
- );
- new_group.set_span(group.span());
- new_group
- }
- _ => tree,
- }
- }).collect()
-}
-
-fn print_helper_ext(input: TokenStream, kind: &str, debug: bool) -> TokenStream {
- let input_display = format!("{}", input);
- let input_debug = format!("{:#?}", input);
- let recollected = input.clone().into_iter().collect();
- let recollected_display = format!("{}", recollected);
- let recollected_debug = format!("{:#?}", recollected);
-
- let deep_recollected = deep_recollect(input);
- let deep_recollected_display = format!("{}", deep_recollected);
- let deep_recollected_debug = format!("{:#?}", deep_recollected);
-
-
-
- println!("PRINT-{} INPUT (DISPLAY): {}", kind, input_display);
- if recollected_display != input_display {
- println!("PRINT-{} RE-COLLECTED (DISPLAY): {}", kind, recollected_display);
- }
-
- if deep_recollected_display != recollected_display {
- println!("PRINT-{} DEEP-RE-COLLECTED (DISPLAY): {}", kind, deep_recollected_display);
- }
-
- if debug {
- println!("PRINT-{} INPUT (DEBUG): {}", kind, input_debug);
- if recollected_debug != input_debug {
- println!("PRINT-{} RE-COLLECTED (DEBUG): {}", kind, recollected_debug);
- }
- if deep_recollected_debug != recollected_debug {
- println!("PRINT-{} DEEP-RE-COLLETED (DEBUG): {}", kind, deep_recollected_debug);
- }
- }
- recollected
-}
-
-#[proc_macro]
-pub fn print_bang(input: TokenStream) -> TokenStream {
- print_helper(input, "BANG")
-}
-
-#[proc_macro]
-pub fn print_bang_consume(input: TokenStream) -> TokenStream {
- print_helper(input, "BANG");
- TokenStream::new()
-}
-
-#[proc_macro_attribute]
-pub fn print_attr(args: TokenStream, input: TokenStream) -> TokenStream {
- let debug = match &args.into_iter().collect::<Vec<_>>()[..] {
- [TokenTree::Ident(ident)] if ident.to_string() == "nodebug" => false,
- _ => true,
- };
- print_helper_ext(input, "ATTR", debug)
-}
-
-#[proc_macro_attribute]
-pub fn print_attr_args(args: TokenStream, input: TokenStream) -> TokenStream {
- print_helper(args, "ATTR_ARGS");
- input
-}
-
-#[proc_macro_attribute]
-pub fn print_target_and_args(args: TokenStream, input: TokenStream) -> TokenStream {
- print_helper(args, "ATTR_ARGS");
- print_helper(input.clone(), "ATTR");
- input
-}
-
-#[proc_macro_attribute]
-pub fn print_target_and_args_consume(args: TokenStream, input: TokenStream) -> TokenStream {
- print_helper(args, "ATTR_ARGS");
- print_helper(input.clone(), "ATTR");
- TokenStream::new()
-}
-
-#[proc_macro_derive(Print, attributes(print_helper))]
-pub fn print_derive(input: TokenStream) -> TokenStream {
- print_helper(input, "DERIVE");
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/three-equals.rs b/src/test/ui/proc-macro/auxiliary/three-equals.rs
deleted file mode 100644
index e740e86e5..000000000
--- a/src/test/ui/proc-macro/auxiliary/three-equals.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Span, Diagnostic};
-
-fn parse(input: TokenStream) -> Result<(), Diagnostic> {
- let mut count = 0;
- let mut last_span = Span::def_site();
- for tree in input {
- let span = tree.span();
- if count >= 3 {
- return Err(span.error(format!("expected EOF, found `{}`.", tree))
- .span_note(last_span, "last good input was here")
- .help("input must be: `===`"))
- }
-
- if let TokenTree::Punct(ref tt) = tree {
- if tt.as_char() == '=' {
- count += 1;
- last_span = span;
- continue
- }
- }
- return Err(span.error(format!("expected `=`, found `{}`.", tree)));
- }
-
- if count < 3 {
- return Err(Span::def_site()
- .error(format!("found {} equal signs, need exactly 3", count))
- .help("input must be: `===`"))
- }
-
- Ok(())
-}
-
-#[proc_macro]
-pub fn three_equals(input: TokenStream) -> TokenStream {
- if let Err(diag) = parse(input) {
- diag.emit();
- return TokenStream::new();
- }
-
- "3".parse().unwrap()
-}
diff --git a/src/test/ui/proc-macro/auxiliary/weird-hygiene.rs b/src/test/ui/proc-macro/auxiliary/weird-hygiene.rs
deleted file mode 100644
index 338e436df..000000000
--- a/src/test/ui/proc-macro/auxiliary/weird-hygiene.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Group};
-
-fn find_my_ident(tokens: TokenStream) -> Option<TokenStream> {
- for token in tokens {
- if let TokenTree::Ident(ident) = &token {
- if ident.to_string() == "hidden_ident" {
- return Some(vec![token].into_iter().collect())
- }
- } else if let TokenTree::Group(g) = token {
- if let Some(stream) = find_my_ident(g.stream()) {
- return Some(stream)
- }
- }
- }
- return None;
-}
-
-
-#[proc_macro_derive(WeirdDerive)]
-pub fn weird_derive(item: TokenStream) -> TokenStream {
- let my_ident = find_my_ident(item).expect("Missing 'my_ident'!");
- let tokens: TokenStream = "call_it!();".parse().unwrap();
- let final_call = tokens.into_iter().map(|tree| {
- if let TokenTree::Group(g) = tree {
- return Group::new(g.delimiter(), my_ident.clone()).into()
- } else {
- return tree
- }
- }).collect();
- final_call
-}
-
-#[proc_macro]
-pub fn recollect(item: TokenStream) -> TokenStream {
- item.into_iter().collect()
-}
-
-#[proc_macro_attribute]
-pub fn recollect_attr(_attr: TokenStream, mut item: TokenStream) -> TokenStream {
- item.into_iter().collect()
-}
diff --git a/src/test/ui/proc-macro/bang-macro.rs b/src/test/ui/proc-macro/bang-macro.rs
deleted file mode 100644
index 928107913..000000000
--- a/src/test/ui/proc-macro/bang-macro.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-pass
-// aux-build:bang-macro.rs
-
-extern crate bang_macro;
-use bang_macro::rewrite;
-
-fn main() {
- assert_eq!(rewrite!("Hello, world!"), "NOT Hello, world!");
-}
diff --git a/src/test/ui/proc-macro/break-token-spans.rs b/src/test/ui/proc-macro/break-token-spans.rs
deleted file mode 100644
index 59dc3b504..000000000
--- a/src/test/ui/proc-macro/break-token-spans.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// aux-build:test-macros.rs
-// Regression test for issues #68489 and #70987
-// Tests that we properly break tokens in `probably_equal_for_proc_macro`
-// See #72306
-//
-// Note that the weird spacing in this example is critical
-// for testing the issue.
-
-extern crate test_macros;
-
-#[test_macros::recollect_attr]
-fn repro() {
- f :: < Vec < _ > > ( ) ; //~ ERROR cannot find
- let a: Option<Option<u8>>= true; //~ ERROR mismatched
-}
-fn main() {}
diff --git a/src/test/ui/proc-macro/break-token-spans.stderr b/src/test/ui/proc-macro/break-token-spans.stderr
deleted file mode 100644
index 0a0322b8a..000000000
--- a/src/test/ui/proc-macro/break-token-spans.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0425]: cannot find function `f` in this scope
- --> $DIR/break-token-spans.rs:13:5
- |
-LL | f :: < Vec < _ > > ( ) ;
- | ^ not found in this scope
-
-error[E0308]: mismatched types
- --> $DIR/break-token-spans.rs:14:32
- |
-LL | let a: Option<Option<u8>>= true;
- | ------------------ ^^^^ expected enum `Option`, found `bool`
- | |
- | expected due to this
- |
- = note: expected enum `Option<Option<u8>>`
- found type `bool`
-
-error: aborting due to 2 previous errors
-
-Some errors have detailed explanations: E0308, E0425.
-For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/call-deprecated.rs b/src/test/ui/proc-macro/call-deprecated.rs
deleted file mode 100644
index cb634671b..000000000
--- a/src/test/ui/proc-macro/call-deprecated.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// check-pass
-// aux-build:call-deprecated.rs
-
-extern crate call_deprecated;
-
-// These first two `#[allow(deprecated)]` attributes
-// do nothing, since the AST nodes for `First` and `Second`
-// haven't been assigned a `NodeId`.
-// See #63221 for a discussion about how we should
-// handle the interaction of 'inert' attributes and
-// proc-macro attributes.
-
-#[allow(deprecated)]
-#[call_deprecated::attr] //~ WARN use of deprecated macro
-struct First;
-
-#[allow(deprecated)]
-#[call_deprecated::attr_remove] //~ WARN use of deprecated macro
-struct Second;
-
-#[allow(deprecated)]
-mod bar {
- #[allow(deprecated)]
- #[call_deprecated::attr]
- struct Third;
-
- #[allow(deprecated)]
- #[call_deprecated::attr_remove]
- struct Fourth;
-}
-
-
-fn main() {
-}
diff --git a/src/test/ui/proc-macro/call-deprecated.stderr b/src/test/ui/proc-macro/call-deprecated.stderr
deleted file mode 100644
index 3506f9a16..000000000
--- a/src/test/ui/proc-macro/call-deprecated.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-warning: use of deprecated macro `call_deprecated::attr`: test
- --> $DIR/call-deprecated.rs:14:3
- |
-LL | #[call_deprecated::attr]
- | ^^^^^^^^^^^^^^^^^^^^^
- |
- = note: `#[warn(deprecated)]` on by default
-
-warning: use of deprecated macro `call_deprecated::attr_remove`: test
- --> $DIR/call-deprecated.rs:18:3
- |
-LL | #[call_deprecated::attr_remove]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-warning: 2 warnings emitted
-
diff --git a/src/test/ui/proc-macro/call-site.rs b/src/test/ui/proc-macro/call-site.rs
deleted file mode 100644
index 12c77250c..000000000
--- a/src/test/ui/proc-macro/call-site.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// check-pass
-// aux-build:call-site.rs
-
-extern crate call_site;
-
-fn main() {
- let x1 = 10;
- call_site::check!(let x2 = x1;);
- let x6 = x5;
-}
diff --git a/src/test/ui/proc-macro/capture-macro-rules-invoke.rs b/src/test/ui/proc-macro/capture-macro-rules-invoke.rs
deleted file mode 100644
index de008a370..000000000
--- a/src/test/ui/proc-macro/capture-macro-rules-invoke.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-// aux-build:test-macros.rs
-// check-pass
-// compile-flags: -Z span-debug
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate test_macros;
-use test_macros::{print_bang, print_bang_consume};
-
-macro_rules! test_matchers {
- ($expr:expr, $block:block, $stmt:stmt, $ty:ty, $ident:ident, $lifetime:lifetime,
- $meta:meta, $path:path, $vis:vis, $tt:tt, $lit:literal) => {
- print_bang_consume!($expr, $block, $stmt, $ty, $ident,
- $lifetime, $meta, $path, $vis, $tt, $lit)
- }
-}
-
-macro_rules! use_expr {
- ($expr:expr) => {
- print_bang!($expr)
- }
-}
-
-macro_rules! use_pat {
- ($pat:pat) => {
- print_bang!($pat)
- }
-}
-
-#[allow(dead_code)]
-struct Foo;
-impl Foo {
- #[allow(dead_code)]
- fn use_self(self) {
- drop(use_expr!(self));
- test_matchers!(
- 1 + 1,
- { "a" },
- let a = 1,
- String,
- my_name,
- 'a,
- my_val = 30,
- std::option::Option,
- pub(in some::path),
- [ a b c ],
- -30
- );
- }
-
- fn with_pat(use_pat!((a, b)): (u32, u32)) {
- let _ = (a, b);
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/capture-macro-rules-invoke.stdout b/src/test/ui/proc-macro/capture-macro-rules-invoke.stdout
deleted file mode 100644
index b88fbd3e8..000000000
--- a/src/test/ui/proc-macro/capture-macro-rules-invoke.stdout
+++ /dev/null
@@ -1,324 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): self
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "self",
- span: $DIR/capture-macro-rules-invoke.rs:36:24: 36:28 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:21:21: 21:26 (#4),
- },
-]
-PRINT-BANG INPUT (DISPLAY): 1 + 1, { "a" }, let a = 1;, String, my_name, 'a, my_val = 30,
-std::option::Option, pub(in some::path) , [a b c], -30
-PRINT-BANG RE-COLLECTED (DISPLAY): 1 + 1, { "a" }, let a = 1, String, my_name, 'a, my_val = 30,
-std :: option :: Option, pub(in some :: path), [a b c], - 30
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/capture-macro-rules-invoke.rs:38:13: 38:14 (#0),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:38:15: 38:16 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/capture-macro-rules-invoke.rs:38:17: 38:18 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:14:29: 14:34 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:14:34: 14:35 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Literal {
- kind: Str,
- symbol: "a",
- suffix: None,
- span: $DIR/capture-macro-rules-invoke.rs:39:15: 39:18 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:39:13: 39:20 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:14:36: 14:42 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:14:42: 14:43 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: $DIR/capture-macro-rules-invoke.rs:40:13: 40:16 (#0),
- },
- Ident {
- ident: "a",
- span: $DIR/capture-macro-rules-invoke.rs:40:17: 40:18 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:40:19: 40:20 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/capture-macro-rules-invoke.rs:40:21: 40:22 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:14:44: 14:49 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:14:49: 14:50 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "String",
- span: $DIR/capture-macro-rules-invoke.rs:41:13: 41:19 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:14:51: 14:54 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:14:54: 14:55 (#8),
- },
- Ident {
- ident: "my_name",
- span: $DIR/capture-macro-rules-invoke.rs:42:13: 42:20 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:14:62: 14:63 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Punct {
- ch: '\'',
- spacing: Joint,
- span: $DIR/capture-macro-rules-invoke.rs:43:13: 43:15 (#0),
- },
- Ident {
- ident: "a",
- span: $DIR/capture-macro-rules-invoke.rs:43:13: 43:15 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:15:29: 15:38 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:15:38: 15:39 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "my_val",
- span: $DIR/capture-macro-rules-invoke.rs:44:13: 44:19 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:44:20: 44:21 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "30",
- suffix: None,
- span: $DIR/capture-macro-rules-invoke.rs:44:22: 44:24 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:15:40: 15:45 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:15:45: 15:46 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "std",
- span: $DIR/capture-macro-rules-invoke.rs:45:13: 45:16 (#0),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/capture-macro-rules-invoke.rs:45:16: 45:17 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:45:17: 45:18 (#0),
- },
- Ident {
- ident: "option",
- span: $DIR/capture-macro-rules-invoke.rs:45:18: 45:24 (#0),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/capture-macro-rules-invoke.rs:45:24: 45:25 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:45:25: 45:26 (#0),
- },
- Ident {
- ident: "Option",
- span: $DIR/capture-macro-rules-invoke.rs:45:26: 45:32 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:15:47: 15:52 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:15:52: 15:53 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "pub",
- span: $DIR/capture-macro-rules-invoke.rs:46:13: 46:16 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "in",
- span: $DIR/capture-macro-rules-invoke.rs:46:17: 46:19 (#0),
- },
- Ident {
- ident: "some",
- span: $DIR/capture-macro-rules-invoke.rs:46:20: 46:24 (#0),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/capture-macro-rules-invoke.rs:46:24: 46:25 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:46:25: 46:26 (#0),
- },
- Ident {
- ident: "path",
- span: $DIR/capture-macro-rules-invoke.rs:46:26: 46:30 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:46:16: 46:31 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:15:54: 15:58 (#8),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:15:58: 15:59 (#8),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "a",
- span: $DIR/capture-macro-rules-invoke.rs:47:15: 47:16 (#0),
- },
- Ident {
- ident: "b",
- span: $DIR/capture-macro-rules-invoke.rs:47:17: 47:18 (#0),
- },
- Ident {
- ident: "c",
- span: $DIR/capture-macro-rules-invoke.rs:47:19: 47:20 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:47:13: 47:22 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:15:63: 15:64 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Punct {
- ch: '-',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:48:13: 48:14 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "30",
- suffix: None,
- span: $DIR/capture-macro-rules-invoke.rs:48:14: 48:16 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:15:65: 15:69 (#8),
- },
-]
-PRINT-BANG INPUT (DISPLAY): (a, b)
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "a",
- span: $DIR/capture-macro-rules-invoke.rs:52:27: 52:28 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/capture-macro-rules-invoke.rs:52:28: 52:29 (#0),
- },
- Ident {
- ident: "b",
- span: $DIR/capture-macro-rules-invoke.rs:52:30: 52:31 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:52:26: 52:32 (#0),
- },
- ],
- span: $DIR/capture-macro-rules-invoke.rs:27:21: 27:25 (#12),
- },
-]
diff --git a/src/test/ui/proc-macro/capture-unglued-token.rs b/src/test/ui/proc-macro/capture-unglued-token.rs
deleted file mode 100644
index 727b77977..000000000
--- a/src/test/ui/proc-macro/capture-unglued-token.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-// check-pass
-
-// Tests that we properly handle parsing a nonterminal
-// where we have two consecutive angle brackets (one inside
-// the nonterminal, and one outside)
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-extern crate test_macros;
-
-macro_rules! trailing_angle {
- (Option<$field:ty>) => {
- test_macros::print_bang_consume!($field);
- }
-}
-
-trailing_angle!(Option<Vec<u8>>);
-fn main() {}
diff --git a/src/test/ui/proc-macro/capture-unglued-token.stdout b/src/test/ui/proc-macro/capture-unglued-token.stdout
deleted file mode 100644
index 7e6b54033..000000000
--- a/src/test/ui/proc-macro/capture-unglued-token.stdout
+++ /dev/null
@@ -1,28 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): Vec<u8>
-PRINT-BANG RE-COLLECTED (DISPLAY): Vec < u8 >
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "Vec",
- span: $DIR/capture-unglued-token.rs:19:24: 19:27 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/capture-unglued-token.rs:19:27: 19:28 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/capture-unglued-token.rs:19:28: 19:30 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/capture-unglued-token.rs:19:30: 19:31 (#0),
- },
- ],
- span: $DIR/capture-unglued-token.rs:15:42: 15:48 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/cfg-eval-fail.rs b/src/test/ui/proc-macro/cfg-eval-fail.rs
deleted file mode 100644
index a259aa2e6..000000000
--- a/src/test/ui/proc-macro/cfg-eval-fail.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![feature(cfg_eval)]
-#![feature(stmt_expr_attributes)]
-
-fn main() {
- let _ = #[cfg_eval] #[cfg(FALSE)] 0;
- //~^ ERROR removing an expression is not supported in this position
-}
diff --git a/src/test/ui/proc-macro/cfg-eval-fail.stderr b/src/test/ui/proc-macro/cfg-eval-fail.stderr
deleted file mode 100644
index df8b6d5f3..000000000
--- a/src/test/ui/proc-macro/cfg-eval-fail.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: removing an expression is not supported in this position
- --> $DIR/cfg-eval-fail.rs:5:25
- |
-LL | let _ = #[cfg_eval] #[cfg(FALSE)] 0;
- | ^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/cfg-eval-inner.rs b/src/test/ui/proc-macro/cfg-eval-inner.rs
deleted file mode 100644
index 5fd3ca0d1..000000000
--- a/src/test/ui/proc-macro/cfg-eval-inner.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-// check-pass
-
-#![feature(cfg_eval)]
-#![feature(custom_inner_attributes)]
-#![feature(stmt_expr_attributes)]
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-struct Foo<T>(T);
-
-impl Foo<[u8; {
- #![cfg_attr(not(FALSE), rustc_dummy(cursed_inner))]
- #![allow(unused)]
- struct Inner {
- field: [u8; {
- #![cfg_attr(not(FALSE), rustc_dummy(another_cursed_inner))]
- 1
- }]
- }
-
- 0
-}]> {
- #![cfg_eval]
- #![print_attr]
- #![cfg_attr(not(FALSE), rustc_dummy(evaluated_attr))]
-
- fn bar() {
- #[cfg(FALSE)] let a = 1;
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/cfg-eval-inner.stdout b/src/test/ui/proc-macro/cfg-eval-inner.stdout
deleted file mode 100644
index 9d25def58..000000000
--- a/src/test/ui/proc-macro/cfg-eval-inner.stdout
+++ /dev/null
@@ -1,247 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): impl Foo <
-[u8 ;
-{
- #! [rustc_dummy(cursed_inner)] #! [allow(unused)] struct Inner
- { field : [u8 ; { #! [rustc_dummy(another_cursed_inner)] 1 }] } 0
-}] > { #! [rustc_dummy(evaluated_attr)] fn bar() {} }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "impl",
- span: $DIR/cfg-eval-inner.rs:18:1: 18:5 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/cfg-eval-inner.rs:18:6: 18:9 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:18:9: 18:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "u8",
- span: $DIR/cfg-eval-inner.rs:18:11: 18:13 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:18:13: 18:14 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:19:5: 19:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:19:6: 19:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/cfg-eval-inner.rs:19:29: 19:40 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "cursed_inner",
- span: $DIR/cfg-eval-inner.rs:19:41: 19:53 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:19:40: 19:54 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:19:5: 19:6 (#0),
- },
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/cfg-eval-inner.rs:20:5: 20:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:20:6: 20:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/cfg-eval-inner.rs:20:8: 20:13 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "unused",
- span: $DIR/cfg-eval-inner.rs:20:14: 20:20 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:20:13: 20:21 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:20:7: 20:22 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/cfg-eval-inner.rs:21:5: 21:11 (#0),
- },
- Ident {
- ident: "Inner",
- span: $DIR/cfg-eval-inner.rs:21:12: 21:17 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "field",
- span: $DIR/cfg-eval-inner.rs:22:9: 22:14 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:22:14: 22:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "u8",
- span: $DIR/cfg-eval-inner.rs:22:17: 22:19 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:22:19: 22:20 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:23:13: 23:14 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:23:14: 23:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/cfg-eval-inner.rs:23:37: 23:48 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "another_cursed_inner",
- span: $DIR/cfg-eval-inner.rs:23:49: 23:69 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:23:48: 23:70 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:23:13: 23:14 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/cfg-eval-inner.rs:24:13: 24:14 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:22:21: 25:10 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:22:16: 25:11 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:21:18: 26:6 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/cfg-eval-inner.rs:28:5: 28:6 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:18:15: 29:2 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:18:10: 29:3 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:29:3: 29:4 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:32:5: 32:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/cfg-eval-inner.rs:32:6: 32:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/cfg-eval-inner.rs:32:29: 32:40 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "evaluated_attr",
- span: $DIR/cfg-eval-inner.rs:32:41: 32:55 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:32:40: 32:56 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:32:5: 32:6 (#0),
- },
- Ident {
- ident: "fn",
- span: $DIR/cfg-eval-inner.rs:34:5: 34:7 (#0),
- },
- Ident {
- ident: "bar",
- span: $DIR/cfg-eval-inner.rs:34:8: 34:11 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/cfg-eval-inner.rs:34:11: 34:13 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/cfg-eval-inner.rs:34:14: 36:6 (#0),
- },
- ],
- span: $DIR/cfg-eval-inner.rs:29:5: 37:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/cfg-eval.rs b/src/test/ui/proc-macro/cfg-eval.rs
deleted file mode 100644
index fa6d015e4..000000000
--- a/src/test/ui/proc-macro/cfg-eval.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-#![feature(cfg_eval)]
-#![feature(proc_macro_hygiene)]
-#![feature(stmt_expr_attributes)]
-#![feature(rustc_attrs)]
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-#[cfg_eval]
-#[print_attr]
-struct S1 {
- #[cfg(FALSE)]
- field_false: u8,
- #[cfg(all(/*true*/))]
- #[cfg_attr(FALSE, unknown_attr)]
- #[cfg_attr(all(/*true*/), allow())]
- field_true: u8,
-}
-
-#[cfg_eval]
-#[cfg(FALSE)]
-struct S2 {}
-
-fn main() {
- // Subtle - we need a trailing comma after the '1' - otherwise, `#[cfg_eval]` will
- // turn this into `(#[cfg(all())] 1)`, which is a parenthesized expression, not a tuple
- // expression. `#[cfg]` is not supported inside parenthesized expressions, so this will
- // produce an error when attribute collection runs.
- let _ = #[cfg_eval] #[print_attr] #[cfg_attr(not(FALSE), rustc_dummy)]
- (#[cfg(FALSE)] 0, #[cfg(all(/*true*/))] 1,);
-}
diff --git a/src/test/ui/proc-macro/cfg-eval.stdout b/src/test/ui/proc-macro/cfg-eval.stdout
deleted file mode 100644
index 6732caf08..000000000
--- a/src/test/ui/proc-macro/cfg-eval.stdout
+++ /dev/null
@@ -1,150 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): struct S1 { #[cfg(all())] #[allow()] field_true : u8, }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/cfg-eval.rs:17:1: 17:7 (#0),
- },
- Ident {
- ident: "S1",
- span: $DIR/cfg-eval.rs:17:8: 17:10 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/cfg-eval.rs:20:5: 20:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/cfg-eval.rs:20:7: 20:10 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "all",
- span: $DIR/cfg-eval.rs:20:11: 20:14 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/cfg-eval.rs:20:14: 20:24 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:20:10: 20:25 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:20:6: 20:26 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/cfg-eval.rs:22:5: 22:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/cfg-eval.rs:22:31: 22:36 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/cfg-eval.rs:22:36: 22:38 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:22:5: 22:6 (#0),
- },
- Ident {
- ident: "field_true",
- span: $DIR/cfg-eval.rs:23:5: 23:15 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/cfg-eval.rs:23:15: 23:16 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/cfg-eval.rs:23:17: 23:19 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/cfg-eval.rs:23:19: 23:20 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:17:11: 24:2 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] (#[cfg(all())] 1,)
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/cfg-eval.rs:35:39: 35:40 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/cfg-eval.rs:35:62: 35:73 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:35:39: 35:40 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/cfg-eval.rs:36:23: 36:24 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/cfg-eval.rs:36:25: 36:28 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "all",
- span: $DIR/cfg-eval.rs:36:29: 36:32 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/cfg-eval.rs:36:32: 36:42 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:36:28: 36:43 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:36:24: 36:44 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/cfg-eval.rs:36:45: 36:46 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/cfg-eval.rs:36:46: 36:47 (#0),
- },
- ],
- span: $DIR/cfg-eval.rs:36:5: 36:48 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/count_compound_ops.rs b/src/test/ui/proc-macro/count_compound_ops.rs
deleted file mode 100644
index 2cb871844..000000000
--- a/src/test/ui/proc-macro/count_compound_ops.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-pass
-// aux-build:count_compound_ops.rs
-
-extern crate count_compound_ops;
-use count_compound_ops::count_compound_ops;
-
-fn main() {
- assert_eq!(count_compound_ops!(foo<=>bar <<<! -baz ++), 4);
-}
diff --git a/src/test/ui/proc-macro/crate-attrs-multiple.rs b/src/test/ui/proc-macro/crate-attrs-multiple.rs
deleted file mode 100644
index 29a0eca41..000000000
--- a/src/test/ui/proc-macro/crate-attrs-multiple.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Multiple custom crate-level attributes, both inert and active.
-
-// check-pass
-// aux-crate:test_macros=test-macros.rs
-
-#![feature(custom_inner_attributes)]
-#![feature(prelude_import)]
-
-#![test_macros::identity_attr]
-#![rustfmt::skip]
-#![test_macros::identity_attr]
-#![rustfmt::skip]
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/crate-var.rs b/src/test/ui/proc-macro/crate-var.rs
deleted file mode 100644
index c0518e4b0..000000000
--- a/src/test/ui/proc-macro/crate-var.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// run-pass
-// aux-build:double.rs
-// aux-build:external-crate-var.rs
-
-#![allow(unused)]
-
-#[macro_use]
-extern crate double;
-#[macro_use]
-extern crate external_crate_var;
-
-struct Foo;
-
-trait Trait {
- const CONST: u32;
- type Assoc;
-}
-
-impl Trait for Foo {
- const CONST: u32 = 0;
- type Assoc = Foo;
-}
-
-macro_rules! local { () => {
- // derive_Double outputs secondary copies of each definition
- // to test what the proc_macro sees.
- mod bar {
- #[derive(Double)]
- struct Bar($crate::Foo);
- }
-
- mod qself {
- #[derive(Double)]
- struct QSelf(<::Foo as $crate::Trait>::Assoc);
- }
-
- mod qself_recurse {
- #[derive(Double)]
- struct QSelfRecurse(<<$crate::Foo as $crate::Trait>::Assoc as $crate::Trait>::Assoc);
- }
-
- mod qself_in_const {
- #[derive(Double)]
- #[repr(u32)]
- enum QSelfInConst {
- Variant = <::Foo as $crate::Trait>::CONST,
- }
- }
-} }
-
-mod local {
- local!();
-}
-
-// and now repeat the above tests, using a macro defined in another crate
-
-mod external {
- external!{}
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/crt-static.rs b/src/test/ui/proc-macro/crt-static.rs
deleted file mode 100644
index 6103acb7b..000000000
--- a/src/test/ui/proc-macro/crt-static.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Test proc-macro crate can be built without additional RUSTFLAGS
-// on musl target
-// override -Ctarget-feature=-crt-static from compiletest
-// compile-flags: --crate-type proc-macro -Ctarget-feature=
-// ignore-wasm32
-// ignore-sgx no support for proc-macro crate type
-// build-pass
-#![crate_type = "proc-macro"]
-
-// FIXME: This don't work when crate-type is specified by attribute
-// `#![crate_type = "proc-macro"]`, not by `--crate-type=proc-macro`
-// command line flag. This is because the list of `cfg` symbols is generated
-// before attributes are parsed. See rustc_interface::util::add_configuration
-#[cfg(target_feature = "crt-static")]
-compile_error!("crt-static is enabled");
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(Foo)]
-pub fn derive_foo(input: TokenStream) -> TokenStream {
- input
-}
diff --git a/src/test/ui/proc-macro/custom-attr-only-one-derive.rs b/src/test/ui/proc-macro/custom-attr-only-one-derive.rs
deleted file mode 100644
index 2cd5b4873..000000000
--- a/src/test/ui/proc-macro/custom-attr-only-one-derive.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// run-pass
-// aux-build:custom-attr-only-one-derive.rs
-
-#![feature(rust_2018_preview)]
-
-#[macro_use]
-extern crate custom_attr_only_one_derive;
-
-#[derive(Bar, Foo)]
-#[custom = "test"]
-pub enum A {
- B,
- C,
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs b/src/test/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs
deleted file mode 100644
index 56ad0612f..000000000
--- a/src/test/ui/proc-macro/debug/auxiliary/macro-dump-debug.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![crate_name = "macro_dump_debug"]
-
-extern crate proc_macro;
-use proc_macro::TokenStream;
-
-#[proc_macro]
-pub fn dump_debug(tokens: TokenStream) -> TokenStream {
- eprintln!("{:?}", tokens);
- eprintln!("{:#?}", tokens);
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/debug/dump-debug-span-debug.rs b/src/test/ui/proc-macro/debug/dump-debug-span-debug.rs
deleted file mode 100644
index 102bd6b7b..000000000
--- a/src/test/ui/proc-macro/debug/dump-debug-span-debug.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// run-pass
-// aux-build:macro-dump-debug.rs
-// compile-flags: -Z span-debug
-
-
-extern crate macro_dump_debug;
-use macro_dump_debug::dump_debug;
-
-dump_debug! {
- ident // ident
- r#ident // raw ident
- , // alone punct
- && // joint punct, two-char op
- ||> // joint punct, two-char op + one-char op
- ||<< // joint punct, two-char op + two-char op
- ..= // joint punct, three-char op
- <<=! // joint punct, three-char op + one-char-op
- () // empty group
- [_] // nonempty group
-
- // unsuffixed literals
- 0
- 1.0
- "S"
- b"B"
- r"R"
- r##"R"##
- br"BR"
- br##"BR"##
- 'C'
- b'B'
-
- // suffixed literals
- 0q
- 1.0q
- "S"q
- b"B"q
- r"R"q
- r##"R"##q
- br"BR"q
- br##"BR"##q
- 'C'q
- b'B'q
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr b/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr
deleted file mode 100644
index fa65cbbf1..000000000
--- a/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr
+++ /dev/null
@@ -1,231 +0,0 @@
-TokenStream [Ident { ident: "ident", span: $DIR/dump-debug-span-debug.rs:10:5: 10:10 (#0) }, Ident { ident: "r#ident", span: $DIR/dump-debug-span-debug.rs:11:5: 11:12 (#0) }, Punct { ch: ',', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:12:5: 12:6 (#0) }, Punct { ch: '&', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:13:5: 13:6 (#0) }, Punct { ch: '&', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:13:6: 13:7 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:14:5: 14:6 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:14:6: 14:7 (#0) }, Punct { ch: '>', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:14:7: 14:8 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:15:5: 15:6 (#0) }, Punct { ch: '|', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:15:6: 15:7 (#0) }, Punct { ch: '<', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:15:7: 15:8 (#0) }, Punct { ch: '<', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:15:8: 15:9 (#0) }, Punct { ch: '.', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:16:5: 16:6 (#0) }, Punct { ch: '.', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:16:6: 16:7 (#0) }, Punct { ch: '=', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:16:7: 16:8 (#0) }, Punct { ch: '<', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:17:5: 17:6 (#0) }, Punct { ch: '<', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:17:6: 17:7 (#0) }, Punct { ch: '=', spacing: Joint, span: $DIR/dump-debug-span-debug.rs:17:7: 17:8 (#0) }, Punct { ch: '!', spacing: Alone, span: $DIR/dump-debug-span-debug.rs:17:8: 17:9 (#0) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/dump-debug-span-debug.rs:18:5: 18:7 (#0) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: $DIR/dump-debug-span-debug.rs:19:6: 19:7 (#0) }], span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0) }, Literal { kind: Integer, symbol: "0", suffix: None, span: $DIR/dump-debug-span-debug.rs:22:5: 22:6 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: $DIR/dump-debug-span-debug.rs:23:5: 23:8 (#0) }, Literal { kind: Str, symbol: "S", suffix: None, span: $DIR/dump-debug-span-debug.rs:24:5: 24:8 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:25:5: 25:9 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: $DIR/dump-debug-span-debug.rs:27:5: 27:13 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:28:5: 28:11 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: $DIR/dump-debug-span-debug.rs:29:5: 29:15 (#0) }, Literal { kind: Char, symbol: "C", suffix: None, span: $DIR/dump-debug-span-debug.rs:30:5: 30:8 (#0) }, Literal { kind: Byte, symbol: "B", suffix: None, span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:34:5: 34:7 (#0) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:35:5: 35:9 (#0) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:36:5: 36:9 (#0) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:37:5: 37:10 (#0) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:39:5: 39:14 (#0) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:40:5: 40:12 (#0) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:41:5: 41:16 (#0) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:42:5: 42:9 (#0) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: $DIR/dump-debug-span-debug.rs:43:5: 43:10 (#0) }]
-TokenStream [
- Ident {
- ident: "ident",
- span: $DIR/dump-debug-span-debug.rs:10:5: 10:10 (#0),
- },
- Ident {
- ident: "r#ident",
- span: $DIR/dump-debug-span-debug.rs:11:5: 11:12 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/dump-debug-span-debug.rs:12:5: 12:6 (#0),
- },
- Punct {
- ch: '&',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:13:5: 13:6 (#0),
- },
- Punct {
- ch: '&',
- spacing: Alone,
- span: $DIR/dump-debug-span-debug.rs:13:6: 13:7 (#0),
- },
- Punct {
- ch: '|',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:14:5: 14:6 (#0),
- },
- Punct {
- ch: '|',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:14:6: 14:7 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/dump-debug-span-debug.rs:14:7: 14:8 (#0),
- },
- Punct {
- ch: '|',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:15:5: 15:6 (#0),
- },
- Punct {
- ch: '|',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:15:6: 15:7 (#0),
- },
- Punct {
- ch: '<',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:15:7: 15:8 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/dump-debug-span-debug.rs:15:8: 15:9 (#0),
- },
- Punct {
- ch: '.',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:16:5: 16:6 (#0),
- },
- Punct {
- ch: '.',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:16:6: 16:7 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/dump-debug-span-debug.rs:16:7: 16:8 (#0),
- },
- Punct {
- ch: '<',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:17:5: 17:6 (#0),
- },
- Punct {
- ch: '<',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:17:6: 17:7 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/dump-debug-span-debug.rs:17:7: 17:8 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/dump-debug-span-debug.rs:17:8: 17:9 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/dump-debug-span-debug.rs:18:5: 18:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "_",
- span: $DIR/dump-debug-span-debug.rs:19:6: 19:7 (#0),
- },
- ],
- span: $DIR/dump-debug-span-debug.rs:19:5: 19:8 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:22:5: 22:6 (#0),
- },
- Literal {
- kind: Float,
- symbol: "1.0",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:23:5: 23:8 (#0),
- },
- Literal {
- kind: Str,
- symbol: "S",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:24:5: 24:8 (#0),
- },
- Literal {
- kind: ByteStr,
- symbol: "B",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:25:5: 25:9 (#0),
- },
- Literal {
- kind: StrRaw(0),
- symbol: "R",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:26:5: 26:9 (#0),
- },
- Literal {
- kind: StrRaw(2),
- symbol: "R",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:27:5: 27:13 (#0),
- },
- Literal {
- kind: ByteStrRaw(0),
- symbol: "BR",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:28:5: 28:11 (#0),
- },
- Literal {
- kind: ByteStrRaw(2),
- symbol: "BR",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:29:5: 29:15 (#0),
- },
- Literal {
- kind: Char,
- symbol: "C",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:30:5: 30:8 (#0),
- },
- Literal {
- kind: Byte,
- symbol: "B",
- suffix: None,
- span: $DIR/dump-debug-span-debug.rs:31:5: 31:9 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:34:5: 34:7 (#0),
- },
- Literal {
- kind: Float,
- symbol: "1.0",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:35:5: 35:9 (#0),
- },
- Literal {
- kind: Str,
- symbol: "S",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:36:5: 36:9 (#0),
- },
- Literal {
- kind: ByteStr,
- symbol: "B",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:37:5: 37:10 (#0),
- },
- Literal {
- kind: StrRaw(0),
- symbol: "R",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:38:5: 38:10 (#0),
- },
- Literal {
- kind: StrRaw(2),
- symbol: "R",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:39:5: 39:14 (#0),
- },
- Literal {
- kind: ByteStrRaw(0),
- symbol: "BR",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:40:5: 40:12 (#0),
- },
- Literal {
- kind: ByteStrRaw(2),
- symbol: "BR",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:41:5: 41:16 (#0),
- },
- Literal {
- kind: Char,
- symbol: "C",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:42:5: 42:9 (#0),
- },
- Literal {
- kind: Byte,
- symbol: "B",
- suffix: Some("q"),
- span: $DIR/dump-debug-span-debug.rs:43:5: 43:10 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/debug/dump-debug.rs b/src/test/ui/proc-macro/debug/dump-debug.rs
deleted file mode 100644
index 0ed36b690..000000000
--- a/src/test/ui/proc-macro/debug/dump-debug.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// run-pass
-// aux-build:macro-dump-debug.rs
-
-extern crate macro_dump_debug;
-use macro_dump_debug::dump_debug;
-
-dump_debug! {
- ident // ident
- r#ident // raw ident
- , // alone punct
- ==> // joint punct
- () // empty group
- [_] // nonempty group
-
- // unsuffixed literals
- 0
- 1.0
- "S"
- b"B"
- r"R"
- r##"R"##
- br"BR"
- br##"BR"##
- 'C'
- b'B'
-
- // suffixed literals
- 0q
- 1.0q
- "S"q
- b"B"q
- r"R"q
- r##"R"##q
- br"BR"q
- br##"BR"##q
- 'C'q
- b'B'q
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/debug/dump-debug.stderr b/src/test/ui/proc-macro/debug/dump-debug.stderr
deleted file mode 100644
index db422b601..000000000
--- a/src/test/ui/proc-macro/debug/dump-debug.stderr
+++ /dev/null
@@ -1,166 +0,0 @@
-TokenStream [Ident { ident: "ident", span: #0 bytes(130..135) }, Ident { ident: "r#ident", span: #0 bytes(151..158) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(176..177) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(203..204) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(204..205) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(205..206) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(230..232) }, Group { delimiter: Bracket, stream: TokenStream [Ident { ident: "_", span: #0 bytes(258..259) }], span: #0 bytes(257..260) }, Literal { kind: Integer, symbol: "0", suffix: None, span: #0 bytes(315..316) }, Literal { kind: Float, symbol: "1.0", suffix: None, span: #0 bytes(321..324) }, Literal { kind: Str, symbol: "S", suffix: None, span: #0 bytes(329..332) }, Literal { kind: ByteStr, symbol: "B", suffix: None, span: #0 bytes(337..341) }, Literal { kind: StrRaw(0), symbol: "R", suffix: None, span: #0 bytes(346..350) }, Literal { kind: StrRaw(2), symbol: "R", suffix: None, span: #0 bytes(355..363) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: None, span: #0 bytes(368..374) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: None, span: #0 bytes(379..389) }, Literal { kind: Char, symbol: "C", suffix: None, span: #0 bytes(394..397) }, Literal { kind: Byte, symbol: "B", suffix: None, span: #0 bytes(402..406) }, Literal { kind: Integer, symbol: "0", suffix: Some("q"), span: #0 bytes(437..439) }, Literal { kind: Float, symbol: "1.0", suffix: Some("q"), span: #0 bytes(444..448) }, Literal { kind: Str, symbol: "S", suffix: Some("q"), span: #0 bytes(453..457) }, Literal { kind: ByteStr, symbol: "B", suffix: Some("q"), span: #0 bytes(462..467) }, Literal { kind: StrRaw(0), symbol: "R", suffix: Some("q"), span: #0 bytes(472..477) }, Literal { kind: StrRaw(2), symbol: "R", suffix: Some("q"), span: #0 bytes(482..491) }, Literal { kind: ByteStrRaw(0), symbol: "BR", suffix: Some("q"), span: #0 bytes(496..503) }, Literal { kind: ByteStrRaw(2), symbol: "BR", suffix: Some("q"), span: #0 bytes(508..519) }, Literal { kind: Char, symbol: "C", suffix: Some("q"), span: #0 bytes(524..528) }, Literal { kind: Byte, symbol: "B", suffix: Some("q"), span: #0 bytes(533..538) }]
-TokenStream [
- Ident {
- ident: "ident",
- span: #0 bytes(130..135),
- },
- Ident {
- ident: "r#ident",
- span: #0 bytes(151..158),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: #0 bytes(176..177),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: #0 bytes(203..204),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: #0 bytes(204..205),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: #0 bytes(205..206),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: #0 bytes(230..232),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "_",
- span: #0 bytes(258..259),
- },
- ],
- span: #0 bytes(257..260),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #0 bytes(315..316),
- },
- Literal {
- kind: Float,
- symbol: "1.0",
- suffix: None,
- span: #0 bytes(321..324),
- },
- Literal {
- kind: Str,
- symbol: "S",
- suffix: None,
- span: #0 bytes(329..332),
- },
- Literal {
- kind: ByteStr,
- symbol: "B",
- suffix: None,
- span: #0 bytes(337..341),
- },
- Literal {
- kind: StrRaw(0),
- symbol: "R",
- suffix: None,
- span: #0 bytes(346..350),
- },
- Literal {
- kind: StrRaw(2),
- symbol: "R",
- suffix: None,
- span: #0 bytes(355..363),
- },
- Literal {
- kind: ByteStrRaw(0),
- symbol: "BR",
- suffix: None,
- span: #0 bytes(368..374),
- },
- Literal {
- kind: ByteStrRaw(2),
- symbol: "BR",
- suffix: None,
- span: #0 bytes(379..389),
- },
- Literal {
- kind: Char,
- symbol: "C",
- suffix: None,
- span: #0 bytes(394..397),
- },
- Literal {
- kind: Byte,
- symbol: "B",
- suffix: None,
- span: #0 bytes(402..406),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: Some("q"),
- span: #0 bytes(437..439),
- },
- Literal {
- kind: Float,
- symbol: "1.0",
- suffix: Some("q"),
- span: #0 bytes(444..448),
- },
- Literal {
- kind: Str,
- symbol: "S",
- suffix: Some("q"),
- span: #0 bytes(453..457),
- },
- Literal {
- kind: ByteStr,
- symbol: "B",
- suffix: Some("q"),
- span: #0 bytes(462..467),
- },
- Literal {
- kind: StrRaw(0),
- symbol: "R",
- suffix: Some("q"),
- span: #0 bytes(472..477),
- },
- Literal {
- kind: StrRaw(2),
- symbol: "R",
- suffix: Some("q"),
- span: #0 bytes(482..491),
- },
- Literal {
- kind: ByteStrRaw(0),
- symbol: "BR",
- suffix: Some("q"),
- span: #0 bytes(496..503),
- },
- Literal {
- kind: ByteStrRaw(2),
- symbol: "BR",
- suffix: Some("q"),
- span: #0 bytes(508..519),
- },
- Literal {
- kind: Char,
- symbol: "C",
- suffix: Some("q"),
- span: #0 bytes(524..528),
- },
- Literal {
- kind: Byte,
- symbol: "B",
- suffix: Some("q"),
- span: #0 bytes(533..538),
- },
-]
diff --git a/src/test/ui/proc-macro/define-two.rs b/src/test/ui/proc-macro/define-two.rs
deleted file mode 100644
index b2184eae3..000000000
--- a/src/test/ui/proc-macro/define-two.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro_derive(A)]
-pub fn foo(input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_derive(A)] //~ ERROR the name `A` is defined multiple times
-pub fn bar(input: TokenStream) -> TokenStream {
- input
-}
diff --git a/src/test/ui/proc-macro/define-two.stderr b/src/test/ui/proc-macro/define-two.stderr
deleted file mode 100644
index bf1bd8427..000000000
--- a/src/test/ui/proc-macro/define-two.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0428]: the name `A` is defined multiple times
- --> $DIR/define-two.rs:15:21
- |
-LL | #[proc_macro_derive(A)]
- | - previous definition of the macro `A` here
-...
-LL | #[proc_macro_derive(A)]
- | ^ `A` redefined here
- |
- = note: `A` must be defined only once in the macro namespace of this module
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/ui/proc-macro/derive-attr-cfg.rs b/src/test/ui/proc-macro/derive-attr-cfg.rs
deleted file mode 100644
index 394774628..000000000
--- a/src/test/ui/proc-macro/derive-attr-cfg.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-pass
-
-#![allow(dead_code)]
-// aux-build:derive-attr-cfg.rs
-
-extern crate derive_attr_cfg;
-use derive_attr_cfg::Foo;
-
-#[derive(Foo)]
-#[foo]
-struct S {
- #[cfg(any())]
- x: i32
-}
-
-fn main() {
-}
diff --git a/src/test/ui/proc-macro/derive-b.rs b/src/test/ui/proc-macro/derive-b.rs
deleted file mode 100644
index a026c2bd7..000000000
--- a/src/test/ui/proc-macro/derive-b.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// run-pass
-// aux-build:derive-b-rpass.rs
-
-extern crate derive_b_rpass as derive_b;
-
-#[derive(Debug, PartialEq, derive_b::B, Eq, Copy, Clone)]
-#[cfg_attr(all(), B[arbitrary tokens])]
-struct B {
- #[C]
- a: u64
-}
-
-fn main() {
- B { a: 3 };
- assert_eq!(B { a: 3 }, B { a: 3 });
- let b = B { a: 3 };
- let _d = b;
- let _e = b;
-}
diff --git a/src/test/ui/proc-macro/derive-bad.rs b/src/test/ui/proc-macro/derive-bad.rs
deleted file mode 100644
index cb5188b5f..000000000
--- a/src/test/ui/proc-macro/derive-bad.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// aux-build:derive-bad.rs
-
-#[macro_use]
-extern crate derive_bad;
-
-#[derive(A)]
-//~^ ERROR proc-macro derive produced unparseable tokens
-//~| ERROR expected `:`, found `}`
-struct A; //~ ERROR the name `A` is defined multiple times
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-bad.stderr b/src/test/ui/proc-macro/derive-bad.stderr
deleted file mode 100644
index 241f99b28..000000000
--- a/src/test/ui/proc-macro/derive-bad.stderr
+++ /dev/null
@@ -1,31 +0,0 @@
-error: expected `:`, found `}`
- --> $DIR/derive-bad.rs:6:10
- |
-LL | #[derive(A)]
- | ^
- | |
- | expected `:`
- | while parsing this struct
- |
- = note: this error originates in the derive macro `A` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: proc-macro derive produced unparseable tokens
- --> $DIR/derive-bad.rs:6:10
- |
-LL | #[derive(A)]
- | ^
-
-error[E0428]: the name `A` is defined multiple times
- --> $DIR/derive-bad.rs:9:1
- |
-LL | #[derive(A)]
- | - previous definition of the type `A` here
-...
-LL | struct A;
- | ^^^^^^^^^ `A` redefined here
- |
- = note: `A` must be defined only once in the type namespace of this module
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/ui/proc-macro/derive-expand-order.rs b/src/test/ui/proc-macro/derive-expand-order.rs
deleted file mode 100644
index 0cf1ceb91..000000000
--- a/src/test/ui/proc-macro/derive-expand-order.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// run-pass
-// aux-build:multiple-derives.rs
-
-extern crate multiple_derives;
-
-use multiple_derives::*;
-
-#[derive(First)]
-#[derive(Second)]
-#[derive(Third, Fourth)]
-#[derive(Fifth)]
-pub struct Foo {}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-expand-order.stdout b/src/test/ui/proc-macro/derive-expand-order.stdout
deleted file mode 100644
index dffbbf149..000000000
--- a/src/test/ui/proc-macro/derive-expand-order.stdout
+++ /dev/null
@@ -1,5 +0,0 @@
-Derive First: #[derive(Second)] #[derive(Third, Fourth)] #[derive(Fifth)] pub struct Foo {}
-Derive Second: #[derive(Third, Fourth)] #[derive(Fifth)] pub struct Foo {}
-Derive Third: #[derive(Fifth)] pub struct Foo {}
-Derive Fourth: #[derive(Fifth)] pub struct Foo {}
-Derive Fifth: pub struct Foo {}
diff --git a/src/test/ui/proc-macro/derive-helper-configured.rs b/src/test/ui/proc-macro/derive-helper-configured.rs
deleted file mode 100644
index 243cf685e..000000000
--- a/src/test/ui/proc-macro/derive-helper-configured.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Derive helpers are resolved successfully inside `cfg_attr`.
-
-// check-pass
-// compile-flats:--cfg TRUE
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[cfg_attr(TRUE, empty_helper)]
-#[derive(Empty)]
-#[cfg_attr(TRUE, empty_helper)]
-struct S {
- #[cfg_attr(TRUE, empty_helper)]
- field: u8,
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-helper-legacy-limits.rs b/src/test/ui/proc-macro/derive-helper-legacy-limits.rs
deleted file mode 100644
index ca904900d..000000000
--- a/src/test/ui/proc-macro/derive-helper-legacy-limits.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Support for legacy derive helpers is limited and heuristic-based
-// (that's exactly the reason why they are deprecated).
-
-// edition:2018
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-use derive as my_derive;
-
-#[my_derive(Empty)]
-#[empty_helper] // OK
-struct S1;
-
-// Legacy helper detection doesn't see through `derive` renaming.
-#[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope
-#[my_derive(Empty)]
-struct S2;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-helper-legacy-limits.stderr b/src/test/ui/proc-macro/derive-helper-legacy-limits.stderr
deleted file mode 100644
index 186f38a00..000000000
--- a/src/test/ui/proc-macro/derive-helper-legacy-limits.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: cannot find attribute `empty_helper` in this scope
- --> $DIR/derive-helper-legacy-limits.rs:17:3
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/derive-helper-legacy-spurious.rs b/src/test/ui/proc-macro/derive-helper-legacy-spurious.rs
deleted file mode 100644
index 4a7e48eed..000000000
--- a/src/test/ui/proc-macro/derive-helper-legacy-spurious.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// aux-build:test-macros.rs
-
-#![dummy] //~ ERROR cannot find attribute `dummy` in this scope
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive(Empty)] //~ ERROR cannot determine resolution for the attribute macro `derive`
-#[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope
-struct Foo {}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-helper-legacy-spurious.stderr b/src/test/ui/proc-macro/derive-helper-legacy-spurious.stderr
deleted file mode 100644
index fd1ed8a3d..000000000
--- a/src/test/ui/proc-macro/derive-helper-legacy-spurious.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error: cannot find attribute `dummy` in this scope
- --> $DIR/derive-helper-legacy-spurious.rs:3:4
- |
-LL | #![dummy]
- | ^^^^^
-
-error: cannot determine resolution for the attribute macro `derive`
- --> $DIR/derive-helper-legacy-spurious.rs:8:3
- |
-LL | #[derive(Empty)]
- | ^^^^^^
- |
- = note: import resolution is stuck, try simplifying macro imports
-
-error: cannot find attribute `empty_helper` in this scope
- --> $DIR/derive-helper-legacy-spurious.rs:9:3
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/proc-macro/derive-helper-shadowed.rs b/src/test/ui/proc-macro/derive-helper-shadowed.rs
deleted file mode 100644
index e299454e0..000000000
--- a/src/test/ui/proc-macro/derive-helper-shadowed.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// aux-build:test-macros.rs
-// aux-build:derive-helper-shadowed-2.rs
-
-#[macro_use]
-extern crate test_macros;
-#[macro_use(empty_helper)]
-extern crate derive_helper_shadowed_2;
-
-macro_rules! empty_helper { () => () }
-
-#[derive(Empty)]
-#[empty_helper] // OK
-struct S;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-helper-shadowing-2.rs b/src/test/ui/proc-macro/derive-helper-shadowing-2.rs
deleted file mode 100644
index 5204d72b9..000000000
--- a/src/test/ui/proc-macro/derive-helper-shadowing-2.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// If a derive macro introduces a helper attribute with the same name as that macro,
-// then make sure that it's usable without ambiguities.
-
-// check-pass
-// aux-build:derive-helper-shadowing-2.rs
-
-#[macro_use]
-extern crate derive_helper_shadowing_2;
-
-#[derive(same_name)]
-struct S {
- #[same_name] // OK, no ambiguity, derive helpers have highest priority
- field: u8,
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.rs b/src/test/ui/proc-macro/derive-helper-shadowing.rs
deleted file mode 100644
index 80d982d25..000000000
--- a/src/test/ui/proc-macro/derive-helper-shadowing.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-// edition:2018
-// aux-build:test-macros.rs
-// aux-build:derive-helper-shadowing.rs
-
-#[macro_use]
-extern crate test_macros;
-#[macro_use]
-extern crate derive_helper_shadowing;
-
-use test_macros::empty_attr as empty_helper;
-
-macro_rules! gen_helper_use {
- () => {
- #[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope
- struct W;
- }
-}
-
-#[empty_helper] //~ ERROR `empty_helper` is ambiguous
- //~| WARN derive helper attribute is used before it is introduced
- //~| WARN this was previously accepted
-#[derive(Empty)]
-struct S {
- #[empty_helper] // OK, no ambiguity, derive helpers have highest priority
- field: [u8; {
- use empty_helper; //~ ERROR `empty_helper` is ambiguous
-
- #[empty_helper] // OK, no ambiguity, derive helpers have highest priority
- struct U;
-
- mod inner {
- // OK, no ambiguity, the non-helper attribute is not in scope here, only the helper.
- #[empty_helper]
- struct V;
-
- gen_helper_use!();
-
- #[derive(GenHelperUse)] //~ ERROR cannot find attribute `empty_helper` in this scope
- struct Owo;
-
- use empty_helper as renamed;
- #[renamed] //~ ERROR cannot use a derive helper attribute through an import
- struct Wow;
- }
-
- 0
- }]
-}
-
-// OK, no ambiguity, only the non-helper attribute is in scope.
-#[empty_helper]
-struct Z;
-
-fn main() {
- let s = S { field: [] };
-}
diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.stderr b/src/test/ui/proc-macro/derive-helper-shadowing.stderr
deleted file mode 100644
index 9c52ca422..000000000
--- a/src/test/ui/proc-macro/derive-helper-shadowing.stderr
+++ /dev/null
@@ -1,89 +0,0 @@
-error: cannot use a derive helper attribute through an import
- --> $DIR/derive-helper-shadowing.rs:42:15
- |
-LL | #[renamed]
- | ^^^^^^^
- |
-note: the derive helper attribute imported here
- --> $DIR/derive-helper-shadowing.rs:41:17
- |
-LL | use empty_helper as renamed;
- | ^^^^^^^^^^^^^^^^^^^^^^^
-
-error: cannot find attribute `empty_helper` in this scope
- --> $DIR/derive-helper-shadowing.rs:38:22
- |
-LL | #[derive(GenHelperUse)]
- | ^^^^^^^^^^^^
- |
- = note: consider importing this attribute macro:
- empty_helper
- = note: this error originates in the derive macro `GenHelperUse` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: cannot find attribute `empty_helper` in this scope
- --> $DIR/derive-helper-shadowing.rs:14:11
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^
-...
-LL | gen_helper_use!();
- | ----------------- in this macro invocation
- |
- = note: consider importing this attribute macro:
- crate::empty_helper
- = note: this error originates in the macro `gen_helper_use` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0659]: `empty_helper` is ambiguous
- --> $DIR/derive-helper-shadowing.rs:26:13
- |
-LL | use empty_helper;
- | ^^^^^^^^^^^^ ambiguous name
- |
- = note: ambiguous because of multiple potential import sources
-note: `empty_helper` could refer to the derive helper attribute defined here
- --> $DIR/derive-helper-shadowing.rs:22:10
- |
-LL | #[derive(Empty)]
- | ^^^^^
-note: `empty_helper` could also refer to the attribute macro imported here
- --> $DIR/derive-helper-shadowing.rs:10:5
- |
-LL | use test_macros::empty_attr as empty_helper;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
-
-error[E0659]: `empty_helper` is ambiguous
- --> $DIR/derive-helper-shadowing.rs:19:3
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a derive helper attribute
-note: `empty_helper` could refer to the derive helper attribute defined here
- --> $DIR/derive-helper-shadowing.rs:22:10
- |
-LL | #[derive(Empty)]
- | ^^^^^
-note: `empty_helper` could also refer to the attribute macro imported here
- --> $DIR/derive-helper-shadowing.rs:10:5
- |
-LL | use test_macros::empty_attr as empty_helper;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
-
-warning: derive helper attribute is used before it is introduced
- --> $DIR/derive-helper-shadowing.rs:19:3
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^
-...
-LL | #[derive(Empty)]
- | ----- the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
- = note: `#[warn(legacy_derive_helpers)]` on by default
-
-error: aborting due to 5 previous errors; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0659`.
diff --git a/src/test/ui/proc-macro/derive-helper-vs-legacy.rs b/src/test/ui/proc-macro/derive-helper-vs-legacy.rs
deleted file mode 100644
index 98836bcb8..000000000
--- a/src/test/ui/proc-macro/derive-helper-vs-legacy.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive(Empty)]
-#[empty_helper] // OK, this is both derive helper and legacy derive helper
-#[derive(Empty)]
-struct S;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-in-mod.rs b/src/test/ui/proc-macro/derive-in-mod.rs
deleted file mode 100644
index 8b5d4e9d0..000000000
--- a/src/test/ui/proc-macro/derive-in-mod.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// aux-build:test-macros.rs
-
-extern crate test_macros;
-
-mod inner {
- use test_macros::Empty;
-
- #[derive(Empty)]
- struct S;
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-multiple-with-packed.rs b/src/test/ui/proc-macro/derive-multiple-with-packed.rs
deleted file mode 100644
index 23578aa0e..000000000
--- a/src/test/ui/proc-macro/derive-multiple-with-packed.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// check-pass
-
-#[derive(Clone, Copy)]
-#[derive(Debug)] // OK, even if `Copy` is in the different `#[derive]`
-#[derive(PartialEq)] // OK too
-#[repr(packed)]
-struct CacheRecordHeader {
- field: u64,
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-same-struct.rs b/src/test/ui/proc-macro/derive-same-struct.rs
deleted file mode 100644
index 528b0f22a..000000000
--- a/src/test/ui/proc-macro/derive-same-struct.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-
-#![allow(path_statements)]
-#![allow(dead_code)]
-// aux-build:derive-same-struct.rs
-
-#[macro_use]
-extern crate derive_same_struct;
-
-#[derive(AToB)]
-struct A;
-
-fn main() {
- C;
-}
diff --git a/src/test/ui/proc-macro/derive-same-struct.stdout b/src/test/ui/proc-macro/derive-same-struct.stdout
deleted file mode 100644
index 7478d9741..000000000
--- a/src/test/ui/proc-macro/derive-same-struct.stdout
+++ /dev/null
@@ -1 +0,0 @@
-input1: "struct A ;"
diff --git a/src/test/ui/proc-macro/derive-still-gated.rs b/src/test/ui/proc-macro/derive-still-gated.rs
deleted file mode 100644
index 3f8d6f071..000000000
--- a/src/test/ui/proc-macro/derive-still-gated.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive_Empty] //~ ERROR cannot find attribute `derive_Empty` in this scope
-struct A;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-still-gated.stderr b/src/test/ui/proc-macro/derive-still-gated.stderr
deleted file mode 100644
index 99289fdfe..000000000
--- a/src/test/ui/proc-macro/derive-still-gated.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: cannot find attribute `derive_Empty` in this scope
- --> $DIR/derive-still-gated.rs:6:3
- |
-LL | #[derive_Empty]
- | ^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/derive-test.rs b/src/test/ui/proc-macro/derive-test.rs
deleted file mode 100644
index b81e38432..000000000
--- a/src/test/ui/proc-macro/derive-test.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// run-pass
-// no-prefer-dynamic
-// compile-flags: --test
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-// ```
-// assert!(true);
-// ```
-#[proc_macro_derive(Foo)]
-pub fn derive_foo(_input: TokenStream) -> TokenStream {
- "".parse().unwrap()
-}
-
-#[test]
-pub fn test_derive() {
- assert!(true);
-}
diff --git a/src/test/ui/proc-macro/derive-two-attrs.rs b/src/test/ui/proc-macro/derive-two-attrs.rs
deleted file mode 100644
index 08225b8e3..000000000
--- a/src/test/ui/proc-macro/derive-two-attrs.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-
-#![allow(dead_code)]
-// aux-build:derive-two-attrs.rs
-
-extern crate derive_two_attrs as foo;
-
-use foo::A;
-
-#[derive(A)]
-#[b]
-#[b]
-struct B;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/derive-union.rs b/src/test/ui/proc-macro/derive-union.rs
deleted file mode 100644
index e83eee093..000000000
--- a/src/test/ui/proc-macro/derive-union.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-pass
-
-#![allow(unused_variables)]
-// aux-build:derive-union.rs
-
-#[macro_use]
-extern crate derive_union;
-
-#[repr(C)]
-#[derive(UnionTest)]
-union Test {
- a: u8,
-}
-
-fn main() {
- let t = Test { a: 0 };
-}
diff --git a/src/test/ui/proc-macro/disappearing-resolution.rs b/src/test/ui/proc-macro/disappearing-resolution.rs
deleted file mode 100644
index 50f04b1ea..000000000
--- a/src/test/ui/proc-macro/disappearing-resolution.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Regression test for issue #64803 (initial attribute resolution can disappear later).
-
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-mod m {
- use test_macros::Empty;
-}
-use m::Empty; //~ ERROR derive macro import `Empty` is private
-
-// To resolve `empty_helper` we need to resolve `Empty`.
-// During initial resolution `use m::Empty` introduces no entries, so we proceed to `macro_use`,
-// successfully resolve `Empty` from there, and then resolve `empty_helper` as its helper.
-// During validation `use m::Empty` introduces a `Res::Err` stub, so `Empty` resolves to it,
-// and `empty_helper` can no longer be resolved.
-#[empty_helper] //~ ERROR cannot find attribute `empty_helper` in this scope
-#[derive(Empty)]
-struct S;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/disappearing-resolution.stderr b/src/test/ui/proc-macro/disappearing-resolution.stderr
deleted file mode 100644
index 5b969549a..000000000
--- a/src/test/ui/proc-macro/disappearing-resolution.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: cannot find attribute `empty_helper` in this scope
- --> $DIR/disappearing-resolution.rs:18:3
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^
-
-error[E0603]: derive macro import `Empty` is private
- --> $DIR/disappearing-resolution.rs:11:8
- |
-LL | use m::Empty;
- | ^^^^^ private derive macro import
- |
-note: the derive macro import `Empty` is defined here...
- --> $DIR/disappearing-resolution.rs:9:9
- |
-LL | use test_macros::Empty;
- | ^^^^^^^^^^^^^^^^^^
-note: ...and refers to the derive macro `Empty` which is defined here
- --> $DIR/auxiliary/test-macros.rs:25:1
- |
-LL | pub fn empty_derive(_: TokenStream) -> TokenStream {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider importing it directly
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0603`.
diff --git a/src/test/ui/proc-macro/doc-comment-preserved.rs b/src/test/ui/proc-macro/doc-comment-preserved.rs
deleted file mode 100644
index ed8ca99bd..000000000
--- a/src/test/ui/proc-macro/doc-comment-preserved.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-print_bang! {
-
-/**
-*******
-* DOC *
-* DOC *
-* DOC *
-*******
-*/
-pub struct S;
-
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/doc-comment-preserved.stdout b/src/test/ui/proc-macro/doc-comment-preserved.stdout
deleted file mode 100644
index f4160d7da..000000000
--- a/src/test/ui/proc-macro/doc-comment-preserved.stdout
+++ /dev/null
@@ -1,54 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): /**
-*******
-* DOC *
-* DOC *
-* DOC *
-*******
-*/
- pub struct S ;
-PRINT-BANG RE-COLLECTED (DISPLAY): #[doc = "\n*******\n* DOC *\n* DOC *\n* DOC *\n*******\n"] pub struct S ;
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/doc-comment-preserved.rs:13:1: 19:3 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "doc",
- span: $DIR/doc-comment-preserved.rs:13:1: 19:3 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/doc-comment-preserved.rs:13:1: 19:3 (#0),
- },
- Literal {
- kind: Str,
- symbol: "\n*******\n* DOC *\n* DOC *\n* DOC *\n*******\n",
- suffix: None,
- span: $DIR/doc-comment-preserved.rs:13:1: 19:3 (#0),
- },
- ],
- span: $DIR/doc-comment-preserved.rs:13:1: 19:3 (#0),
- },
- Ident {
- ident: "pub",
- span: $DIR/doc-comment-preserved.rs:20:1: 20:4 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/doc-comment-preserved.rs:20:5: 20:11 (#0),
- },
- Ident {
- ident: "S",
- span: $DIR/doc-comment-preserved.rs:20:12: 20:13 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/doc-comment-preserved.rs:20:13: 20:14 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/dollar-crate-issue-101211.rs b/src/test/ui/proc-macro/dollar-crate-issue-101211.rs
deleted file mode 100644
index fc1acfd32..000000000
--- a/src/test/ui/proc-macro/dollar-crate-issue-101211.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// check-pass
-// edition:2021
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! foo {
- ($($path:ident)::*) => (
- test_macros::recollect!(
- $($path)::*
- )
- )
-}
-
-macro_rules! baz {
- () => (
- foo!($crate::BAR)
- )
-}
-
-pub const BAR: u32 = 19;
-
-fn main(){
- std::println!("{}", baz!());
-}
diff --git a/src/test/ui/proc-macro/dollar-crate-issue-57089.rs b/src/test/ui/proc-macro/dollar-crate-issue-57089.rs
deleted file mode 100644
index 27bfa099f..000000000
--- a/src/test/ui/proc-macro/dollar-crate-issue-57089.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// check-pass
-// edition:2018
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-type S = u8;
-
-macro_rules! m {
- () => {
- print_bang! {
- struct M($crate::S);
- }
-
- #[print_attr]
- struct A($crate::S);
- };
-}
-
-m!();
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/dollar-crate-issue-57089.stdout b/src/test/ui/proc-macro/dollar-crate-issue-57089.stdout
deleted file mode 100644
index 2622c005d..000000000
--- a/src/test/ui/proc-macro/dollar-crate-issue-57089.stdout
+++ /dev/null
@@ -1,80 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ;
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/dollar-crate-issue-57089.rs:17:13: 17:19 (#4),
- },
- Ident {
- ident: "M",
- span: $DIR/dollar-crate-issue-57089.rs:17:20: 17:21 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/dollar-crate-issue-57089.rs:17:22: 17:28 (#4),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/dollar-crate-issue-57089.rs:17:28: 17:29 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/dollar-crate-issue-57089.rs:17:29: 17:30 (#4),
- },
- Ident {
- ident: "S",
- span: $DIR/dollar-crate-issue-57089.rs:17:30: 17:31 (#4),
- },
- ],
- span: $DIR/dollar-crate-issue-57089.rs:17:21: 17:32 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/dollar-crate-issue-57089.rs:17:32: 17:33 (#4),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/dollar-crate-issue-57089.rs:21:9: 21:15 (#4),
- },
- Ident {
- ident: "A",
- span: $DIR/dollar-crate-issue-57089.rs:21:16: 21:17 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/dollar-crate-issue-57089.rs:21:18: 21:24 (#4),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/dollar-crate-issue-57089.rs:21:24: 21:25 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/dollar-crate-issue-57089.rs:21:25: 21:26 (#4),
- },
- Ident {
- ident: "S",
- span: $DIR/dollar-crate-issue-57089.rs:21:26: 21:27 (#4),
- },
- ],
- span: $DIR/dollar-crate-issue-57089.rs:21:17: 21:28 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/dollar-crate-issue-57089.rs:21:28: 21:29 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/dollar-crate-issue-62325.rs b/src/test/ui/proc-macro/dollar-crate-issue-62325.rs
deleted file mode 100644
index d828fb9fd..000000000
--- a/src/test/ui/proc-macro/dollar-crate-issue-62325.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// check-pass
-// edition:2018
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-// aux-build:dollar-crate-external.rs
-
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-extern crate dollar_crate_external;
-
-type S = u8;
-
-macro_rules! m { () => {
- #[print_attr]
- struct A(identity!($crate::S));
-}}
-
-m!();
-
-dollar_crate_external::issue_62325!();
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/dollar-crate-issue-62325.stdout b/src/test/ui/proc-macro/dollar-crate-issue-62325.stdout
deleted file mode 100644
index a91908239..000000000
--- a/src/test/ui/proc-macro/dollar-crate-issue-62325.stdout
+++ /dev/null
@@ -1,110 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): struct A(identity! ($crate :: S)) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/dollar-crate-issue-62325.rs:19:5: 19:11 (#4),
- },
- Ident {
- ident: "A",
- span: $DIR/dollar-crate-issue-62325.rs:19:12: 19:13 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "identity",
- span: $DIR/dollar-crate-issue-62325.rs:19:14: 19:22 (#4),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/dollar-crate-issue-62325.rs:19:22: 19:23 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/dollar-crate-issue-62325.rs:19:24: 19:30 (#4),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/dollar-crate-issue-62325.rs:19:30: 19:31 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/dollar-crate-issue-62325.rs:19:31: 19:32 (#4),
- },
- Ident {
- ident: "S",
- span: $DIR/dollar-crate-issue-62325.rs:19:32: 19:33 (#4),
- },
- ],
- span: $DIR/dollar-crate-issue-62325.rs:19:23: 19:34 (#4),
- },
- ],
- span: $DIR/dollar-crate-issue-62325.rs:19:13: 19:35 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/dollar-crate-issue-62325.rs:19:35: 19:36 (#4),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): struct B(identity! ($crate :: S)) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/auxiliary/dollar-crate-external.rs:21:5: 21:11 (#12),
- },
- Ident {
- ident: "B",
- span: $DIR/auxiliary/dollar-crate-external.rs:21:12: 21:13 (#12),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "identity",
- span: $DIR/auxiliary/dollar-crate-external.rs:21:14: 21:22 (#12),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:21:22: 21:23 (#12),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/auxiliary/dollar-crate-external.rs:21:24: 21:30 (#12),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/auxiliary/dollar-crate-external.rs:21:30: 21:31 (#12),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:21:31: 21:32 (#12),
- },
- Ident {
- ident: "S",
- span: $DIR/auxiliary/dollar-crate-external.rs:21:32: 21:33 (#12),
- },
- ],
- span: $DIR/auxiliary/dollar-crate-external.rs:21:23: 21:34 (#12),
- },
- ],
- span: $DIR/auxiliary/dollar-crate-external.rs:21:13: 21:35 (#12),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:21:35: 21:36 (#12),
- },
-]
diff --git a/src/test/ui/proc-macro/dollar-crate.rs b/src/test/ui/proc-macro/dollar-crate.rs
deleted file mode 100644
index ac27dfa1a..000000000
--- a/src/test/ui/proc-macro/dollar-crate.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// check-pass
-// edition:2018
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-// aux-build:dollar-crate-external.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-extern crate dollar_crate_external;
-
-type S = u8;
-
-mod local {
- macro_rules! local {
- () => {
- print_bang! {
- struct M($crate::S);
- }
-
- #[print_attr]
- struct A($crate::S);
-
- #[derive(Print)]
- struct D($crate::S);
- };
- }
-
- local!();
-}
-
-mod external {
- use crate::dollar_crate_external;
-
- dollar_crate_external::external!();
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/dollar-crate.stdout b/src/test/ui/proc-macro/dollar-crate.stdout
deleted file mode 100644
index 4e169d47e..000000000
--- a/src/test/ui/proc-macro/dollar-crate.stdout
+++ /dev/null
@@ -1,240 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ;
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/dollar-crate.rs:20:17: 20:23 (#4),
- },
- Ident {
- ident: "M",
- span: $DIR/dollar-crate.rs:20:24: 20:25 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/dollar-crate.rs:20:26: 20:32 (#4),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/dollar-crate.rs:20:32: 20:33 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/dollar-crate.rs:20:33: 20:34 (#4),
- },
- Ident {
- ident: "S",
- span: $DIR/dollar-crate.rs:20:34: 20:35 (#4),
- },
- ],
- span: $DIR/dollar-crate.rs:20:25: 20:36 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/dollar-crate.rs:20:36: 20:37 (#4),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/dollar-crate.rs:24:13: 24:19 (#4),
- },
- Ident {
- ident: "A",
- span: $DIR/dollar-crate.rs:24:20: 24:21 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/dollar-crate.rs:24:22: 24:28 (#4),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/dollar-crate.rs:24:28: 24:29 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/dollar-crate.rs:24:29: 24:30 (#4),
- },
- Ident {
- ident: "S",
- span: $DIR/dollar-crate.rs:24:30: 24:31 (#4),
- },
- ],
- span: $DIR/dollar-crate.rs:24:21: 24:32 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/dollar-crate.rs:24:32: 24:33 (#4),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S) ;
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/dollar-crate.rs:27:13: 27:19 (#4),
- },
- Ident {
- ident: "D",
- span: $DIR/dollar-crate.rs:27:20: 27:21 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/dollar-crate.rs:27:22: 27:28 (#4),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/dollar-crate.rs:27:28: 27:29 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/dollar-crate.rs:27:29: 27:30 (#4),
- },
- Ident {
- ident: "S",
- span: $DIR/dollar-crate.rs:27:30: 27:31 (#4),
- },
- ],
- span: $DIR/dollar-crate.rs:27:21: 27:32 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/dollar-crate.rs:27:32: 27:33 (#4),
- },
-]
-PRINT-BANG INPUT (DISPLAY): struct M($crate :: S) ;
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/auxiliary/dollar-crate-external.rs:7:13: 7:19 (#15),
- },
- Ident {
- ident: "M",
- span: $DIR/auxiliary/dollar-crate-external.rs:7:20: 7:21 (#15),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/auxiliary/dollar-crate-external.rs:7:22: 7:28 (#15),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/auxiliary/dollar-crate-external.rs:7:28: 7:29 (#15),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:7:29: 7:30 (#15),
- },
- Ident {
- ident: "S",
- span: $DIR/auxiliary/dollar-crate-external.rs:7:30: 7:31 (#15),
- },
- ],
- span: $DIR/auxiliary/dollar-crate-external.rs:7:21: 7:32 (#15),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:7:32: 7:33 (#15),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): struct A($crate :: S) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/auxiliary/dollar-crate-external.rs:11:9: 11:15 (#15),
- },
- Ident {
- ident: "A",
- span: $DIR/auxiliary/dollar-crate-external.rs:11:16: 11:17 (#15),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/auxiliary/dollar-crate-external.rs:11:18: 11:24 (#15),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/auxiliary/dollar-crate-external.rs:11:24: 11:25 (#15),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:11:25: 11:26 (#15),
- },
- Ident {
- ident: "S",
- span: $DIR/auxiliary/dollar-crate-external.rs:11:26: 11:27 (#15),
- },
- ],
- span: $DIR/auxiliary/dollar-crate-external.rs:11:17: 11:28 (#15),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:11:28: 11:29 (#15),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): struct D($crate :: S) ;
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/auxiliary/dollar-crate-external.rs:14:9: 14:15 (#15),
- },
- Ident {
- ident: "D",
- span: $DIR/auxiliary/dollar-crate-external.rs:14:16: 14:17 (#15),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "$crate",
- span: $DIR/auxiliary/dollar-crate-external.rs:14:18: 14:24 (#15),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/auxiliary/dollar-crate-external.rs:14:24: 14:25 (#15),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:14:25: 14:26 (#15),
- },
- Ident {
- ident: "S",
- span: $DIR/auxiliary/dollar-crate-external.rs:14:26: 14:27 (#15),
- },
- ],
- span: $DIR/auxiliary/dollar-crate-external.rs:14:17: 14:28 (#15),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/auxiliary/dollar-crate-external.rs:14:28: 14:29 (#15),
- },
-]
diff --git a/src/test/ui/proc-macro/edition-imports-2018.rs b/src/test/ui/proc-macro/edition-imports-2018.rs
deleted file mode 100644
index 5a77cd4ef..000000000
--- a/src/test/ui/proc-macro/edition-imports-2018.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// edition:2018
-// aux-build:edition-imports-2015.rs
-
-#[macro_use]
-extern crate edition_imports_2015;
-
-mod import {
- pub struct Path;
-}
-mod absolute {
- pub struct Path;
-}
-
-mod check {
- #[derive(Derive2015)] // OK
- struct S;
-
- fn check() {
- Path;
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/empty-crate.rs b/src/test/ui/proc-macro/empty-crate.rs
deleted file mode 100644
index 3e54c9fee..000000000
--- a/src/test/ui/proc-macro/empty-crate.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-pass
-
-#![allow(unused_imports)]
-// aux-build:empty-crate.rs
-
-#[macro_use]
-extern crate empty_crate;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/empty-where-clause.rs b/src/test/ui/proc-macro/empty-where-clause.rs
deleted file mode 100644
index 719555c09..000000000
--- a/src/test/ui/proc-macro/empty-where-clause.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// aux-build:test-macros.rs
-
-extern crate test_macros;
-use test_macros::recollect_attr;
-
-#[recollect_attr]
-struct FieldStruct where {
- field: MissingType1 //~ ERROR cannot find
-}
-
-#[recollect_attr]
-struct TupleStruct(MissingType2) where; //~ ERROR cannot find
-
-enum MyEnum where {
- Variant(MissingType3) //~ ERROR cannot find
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/empty-where-clause.stderr b/src/test/ui/proc-macro/empty-where-clause.stderr
deleted file mode 100644
index 192a2b30f..000000000
--- a/src/test/ui/proc-macro/empty-where-clause.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0412]: cannot find type `MissingType1` in this scope
- --> $DIR/empty-where-clause.rs:8:12
- |
-LL | field: MissingType1
- | ^^^^^^^^^^^^ not found in this scope
-
-error[E0412]: cannot find type `MissingType2` in this scope
- --> $DIR/empty-where-clause.rs:12:20
- |
-LL | struct TupleStruct(MissingType2) where;
- | ^^^^^^^^^^^^ not found in this scope
-
-error[E0412]: cannot find type `MissingType3` in this scope
- --> $DIR/empty-where-clause.rs:15:13
- |
-LL | Variant(MissingType3)
- | ^^^^^^^^^^^^ not found in this scope
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/proc-macro/expand-expr.rs b/src/test/ui/proc-macro/expand-expr.rs
deleted file mode 100644
index 901b3a951..000000000
--- a/src/test/ui/proc-macro/expand-expr.rs
+++ /dev/null
@@ -1,132 +0,0 @@
-// aux-build:expand-expr.rs
-#![feature(concat_bytes)]
-extern crate expand_expr;
-
-use expand_expr::{
- check_expand_expr_file, echo_pm, expand_expr_fail, expand_expr_is, recursive_expand,
-};
-
-// Check builtin macros can be expanded.
-
-expand_expr_is!(11u32, line!());
-expand_expr_is!(24u32, column!());
-
-expand_expr_is!("Hello, World!", concat!("Hello, ", "World", "!"));
-expand_expr_is!("int10floats5.3booltrue", concat!("int", 10, "floats", 5.3, "bool", true));
-expand_expr_is!("Hello", concat!(r##"Hello"##));
-
-expand_expr_is!("Included file contents\n", include_str!("auxiliary/included-file.txt"));
-expand_expr_is!(b"Included file contents\n", include_bytes!("auxiliary/included-file.txt"));
-
-expand_expr_is!(
- "contents: Included file contents\n",
- concat!("contents: ", include_str!("auxiliary/included-file.txt"))
-);
-
-expand_expr_is!(
- b"contents: Included file contents\n",
- concat_bytes!(b"contents: ", include_bytes!("auxiliary/included-file.txt"))
-);
-
-// Correct value is checked for multiple sources.
-check_expand_expr_file!(file!());
-
-expand_expr_is!("hello", stringify!(hello));
-expand_expr_is!("10 + 20", stringify!(10 + 20));
-
-macro_rules! echo_tts {
- ($($t:tt)*) => { $($t)* }; //~ ERROR: expected expression, found `$`
-}
-
-macro_rules! echo_lit {
- ($l:literal) => {
- $l
- };
-}
-
-macro_rules! echo_expr {
- ($e:expr) => {
- $e
- };
-}
-
-macro_rules! simple_lit {
- ($l:literal) => {
- expand_expr_is!($l, $l);
- expand_expr_is!($l, echo_lit!($l));
- expand_expr_is!($l, echo_expr!($l));
- expand_expr_is!($l, echo_tts!($l));
- expand_expr_is!($l, echo_pm!($l));
- const _: () = {
- macro_rules! mac {
- () => {
- $l
- };
- }
- expand_expr_is!($l, mac!());
- expand_expr_is!($l, echo_expr!(mac!()));
- expand_expr_is!($l, echo_tts!(mac!()));
- expand_expr_is!($l, echo_pm!(mac!()));
- };
- };
-}
-
-simple_lit!("Hello, World");
-simple_lit!('c');
-simple_lit!(b'c');
-simple_lit!(10);
-simple_lit!(10.0);
-simple_lit!(10.0f64);
-simple_lit!(-3.14159);
-simple_lit!(-3.5e10);
-simple_lit!(0xFEED);
-simple_lit!(-0xFEED);
-simple_lit!(0b0100);
-simple_lit!(-0b0100);
-simple_lit!("string");
-simple_lit!(r##"raw string"##);
-simple_lit!(b"byte string");
-simple_lit!(br##"raw byte string"##);
-simple_lit!(true);
-simple_lit!(false);
-
-// Ensure char escapes aren't normalized by expansion
-simple_lit!("\u{0}");
-simple_lit!("\0");
-simple_lit!("\x00");
-simple_lit!('\u{0}');
-simple_lit!('\0');
-simple_lit!('\x00');
-simple_lit!(b"\x00");
-simple_lit!(b"\0");
-simple_lit!(b'\x00');
-simple_lit!(b'\0');
-
-// Extra tokens after the string literal aren't ignored
-expand_expr_fail!("string"; hello); //~ ERROR: expected one of `.`, `?`, or an operator, found `;`
-
-// Invalid expressions produce errors in addition to returning `Err(())`.
-expand_expr_fail!($); //~ ERROR: expected expression, found `$`
-expand_expr_fail!(echo_tts!($));
-expand_expr_fail!(echo_pm!($)); //~ ERROR: expected expression, found `$`
-
-// We get errors reported and recover during macro expansion if the macro
-// doesn't produce a valid expression.
-expand_expr_is!("string", echo_tts!("string"; hello)); //~ ERROR: macro expansion ignores token `hello` and any following
-expand_expr_is!("string", echo_pm!("string"; hello)); //~ ERROR: macro expansion ignores token `;` and any following
-
-// For now, fail if a non-literal expression is expanded.
-expand_expr_fail!(arbitrary_expression() + "etc");
-expand_expr_fail!(echo_tts!(arbitrary_expression() + "etc"));
-expand_expr_fail!(echo_expr!(arbitrary_expression() + "etc"));
-expand_expr_fail!(echo_pm!(arbitrary_expression() + "etc"));
-
-const _: u32 = recursive_expand!(); //~ ERROR: recursion limit reached while expanding `recursive_expand!`
-
-fn main() {
- // https://github.com/rust-lang/rust/issues/104414
- match b"Included file contents\n" {
- include_bytes!("auxiliary/included-file.txt") => (),
- _ => panic!("include_bytes! in pattern"),
- }
-}
diff --git a/src/test/ui/proc-macro/expand-expr.stderr b/src/test/ui/proc-macro/expand-expr.stderr
deleted file mode 100644
index c6c4695fd..000000000
--- a/src/test/ui/proc-macro/expand-expr.stderr
+++ /dev/null
@@ -1,55 +0,0 @@
-error: expected one of `.`, `?`, or an operator, found `;`
- --> $DIR/expand-expr.rs:106:27
- |
-LL | expand_expr_fail!("string"; hello);
- | ^ expected one of `.`, `?`, or an operator
-
-error: expected expression, found `$`
- --> $DIR/expand-expr.rs:109:19
- |
-LL | expand_expr_fail!($);
- | ^ expected expression
-
-error: expected expression, found `$`
- --> $DIR/expand-expr.rs:38:23
- |
-LL | ($($t:tt)*) => { $($t)* };
- | ^^^^ expected expression
-
-error: expected expression, found `$`
- --> $DIR/expand-expr.rs:111:28
- |
-LL | expand_expr_fail!(echo_pm!($));
- | ^ expected expression
-
-error: macro expansion ignores token `hello` and any following
- --> $DIR/expand-expr.rs:115:47
- |
-LL | expand_expr_is!("string", echo_tts!("string"; hello));
- | --------------------^^^^^-- help: you might be missing a semicolon here: `;`
- | |
- | caused by the macro expansion here
- |
- = note: the usage of `echo_tts!` is likely invalid in expression context
-
-error: macro expansion ignores token `;` and any following
- --> $DIR/expand-expr.rs:116:44
- |
-LL | expand_expr_is!("string", echo_pm!("string"; hello));
- | -----------------^-------- help: you might be missing a semicolon here: `;`
- | |
- | caused by the macro expansion here
- |
- = note: the usage of `echo_pm!` is likely invalid in expression context
-
-error: recursion limit reached while expanding `recursive_expand!`
- --> $DIR/expand-expr.rs:124:16
- |
-LL | const _: u32 = recursive_expand!();
- | ^^^^^^^^^^^^^^^^^^^
- |
- = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`expand_expr`)
- = note: this error originates in the macro `recursive_expand` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 7 previous errors
-
diff --git a/src/test/ui/proc-macro/expand-to-derive.rs b/src/test/ui/proc-macro/expand-to-derive.rs
deleted file mode 100644
index ff2876e84..000000000
--- a/src/test/ui/proc-macro/expand-to-derive.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug --error-format human
-// aux-build:test-macros.rs
-
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! expand_to_derive {
- ($item:item) => {
- #[derive(Print)]
- struct Foo {
- #[cfg(FALSE)] removed: bool,
- field: [bool; {
- $item
- 0
- }]
- }
- };
-}
-
-expand_to_derive! {
- #[cfg_attr(not(FALSE), rustc_dummy)]
- struct Inner {
- #[cfg(FALSE)] removed_inner_field: bool,
- other_inner_field: u8,
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/expand-to-derive.stdout b/src/test/ui/proc-macro/expand-to-derive.stdout
deleted file mode 100644
index a6437982a..000000000
--- a/src/test/ui/proc-macro/expand-to-derive.stdout
+++ /dev/null
@@ -1,104 +0,0 @@
-PRINT-DERIVE INPUT (DISPLAY): struct Foo
-{
- field :
- [bool ; { #[rustc_dummy] struct Inner { other_inner_field : u8, } 0 }]
-}
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/expand-to-derive.rs:16:9: 16:15 (#4),
- },
- Ident {
- ident: "Foo",
- span: $DIR/expand-to-derive.rs:16:16: 16:19 (#4),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "field",
- span: $DIR/expand-to-derive.rs:18:13: 18:18 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/expand-to-derive.rs:18:18: 18:19 (#4),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "bool",
- span: $DIR/expand-to-derive.rs:18:21: 18:25 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/expand-to-derive.rs:18:25: 18:26 (#4),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/expand-to-derive.rs:27:5: 27:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/expand-to-derive.rs:27:28: 27:39 (#0),
- },
- ],
- span: $DIR/expand-to-derive.rs:27:5: 27:6 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/expand-to-derive.rs:28:5: 28:11 (#0),
- },
- Ident {
- ident: "Inner",
- span: $DIR/expand-to-derive.rs:28:12: 28:17 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "other_inner_field",
- span: $DIR/expand-to-derive.rs:30:9: 30:26 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/expand-to-derive.rs:30:26: 30:27 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/expand-to-derive.rs:30:28: 30:30 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/expand-to-derive.rs:30:30: 30:31 (#0),
- },
- ],
- span: $DIR/expand-to-derive.rs:28:18: 31:6 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/expand-to-derive.rs:20:17: 20:18 (#4),
- },
- ],
- span: $DIR/expand-to-derive.rs:18:27: 21:14 (#4),
- },
- ],
- span: $DIR/expand-to-derive.rs:18:20: 21:15 (#4),
- },
- ],
- span: $DIR/expand-to-derive.rs:16:20: 22:10 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/expand-to-unstable.rs b/src/test/ui/proc-macro/expand-to-unstable.rs
deleted file mode 100644
index 0825c1a8e..000000000
--- a/src/test/ui/proc-macro/expand-to-unstable.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// aux-build:derive-unstable.rs
-
-#![allow(warnings)]
-
-#[macro_use]
-extern crate derive_unstable;
-
-#[derive(Unstable)]
-//~^ ERROR: use of unstable library feature
-struct A;
-
-fn main() {
- unsafe { foo(); }
-}
diff --git a/src/test/ui/proc-macro/expand-to-unstable.stderr b/src/test/ui/proc-macro/expand-to-unstable.stderr
deleted file mode 100644
index b27dcd7e6..000000000
--- a/src/test/ui/proc-macro/expand-to-unstable.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
- --> $DIR/expand-to-unstable.rs:8:10
- |
-LL | #[derive(Unstable)]
- | ^^^^^^^^
- |
- = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
- = note: this error originates in the derive macro `Unstable` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/proc-macro/expand-with-a-macro.rs b/src/test/ui/proc-macro/expand-with-a-macro.rs
deleted file mode 100644
index 042a28365..000000000
--- a/src/test/ui/proc-macro/expand-with-a-macro.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// run-pass
-// needs-unwind
-// aux-build:expand-with-a-macro.rs
-
-
-#![deny(warnings)]
-
-#[macro_use]
-extern crate expand_with_a_macro;
-
-use std::panic;
-
-#[derive(A)]
-struct A;
-
-fn main() {
- assert!(panic::catch_unwind(|| {
- A.a();
- }).is_err());
-}
diff --git a/src/test/ui/proc-macro/export-macro.rs b/src/test/ui/proc-macro/export-macro.rs
deleted file mode 100644
index ad69fe5ee..000000000
--- a/src/test/ui/proc-macro/export-macro.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// error-pattern: cannot export macro_rules! macros from a `proc-macro` crate
-
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-#[macro_export]
-macro_rules! foo {
- ($e:expr) => ($e)
-}
diff --git a/src/test/ui/proc-macro/export-macro.stderr b/src/test/ui/proc-macro/export-macro.stderr
deleted file mode 100644
index 36a6a9bb3..000000000
--- a/src/test/ui/proc-macro/export-macro.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: cannot export macro_rules! macros from a `proc-macro` crate type currently
- --> $DIR/export-macro.rs:9:1
- |
-LL | macro_rules! foo {
- | ^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/exports.rs b/src/test/ui/proc-macro/exports.rs
deleted file mode 100644
index a40c15908..000000000
--- a/src/test/ui/proc-macro/exports.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![allow(warnings)]
-
-pub fn a() {} //~ ERROR: cannot export any items
-pub struct B; //~ ERROR: cannot export any items
-pub enum C {} //~ ERROR: cannot export any items
-pub mod d {} //~ ERROR: cannot export any items
-
-mod e {}
-struct F;
-enum G {}
-fn h() {}
diff --git a/src/test/ui/proc-macro/exports.stderr b/src/test/ui/proc-macro/exports.stderr
deleted file mode 100644
index 7b23d08f2..000000000
--- a/src/test/ui/proc-macro/exports.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
- --> $DIR/exports.rs:7:1
- |
-LL | pub fn a() {}
- | ^^^^^^^^^^
-
-error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
- --> $DIR/exports.rs:8:1
- |
-LL | pub struct B;
- | ^^^^^^^^^^^^^
-
-error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
- --> $DIR/exports.rs:9:1
- |
-LL | pub enum C {}
- | ^^^^^^^^^^
-
-error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
- --> $DIR/exports.rs:10:1
- |
-LL | pub mod d {}
- | ^^^^^^^^^
-
-error: aborting due to 4 previous errors
-
diff --git a/src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.rs b/src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.rs
deleted file mode 100644
index d4067a335..000000000
--- a/src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-
-#![feature(decl_macro)]
-#![feature(stmt_expr_attributes)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro mac {
- (expr $expr:expr) => {
- #[derive(Print)]
- enum E {
- V = { let _ = $expr; 0 },
- }
- },
- (stmt $stmt:stmt) => {
- #[derive(Print)]
- enum E {
- V = { let _ = { $stmt }; 0 },
- }
- },
-}
-
-const PATH: u8 = 2;
-
-fn main() {
- mac!(expr #[allow(warnings)] 0);
- mac!(stmt 0);
- mac!(stmt {});
- mac!(stmt PATH);
- mac!(stmt 0 + 1);
- mac!(stmt PATH + 1);
-}
diff --git a/src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout b/src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout
deleted file mode 100644
index 686d53e88..000000000
--- a/src/test/ui/proc-macro/expr-stmt-nonterminal-tokens.stdout
+++ /dev/null
@@ -1,540 +0,0 @@
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = #[allow(warnings)] 0 ; 0 }, }
-PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = #[allow(warnings)] #[allow(warnings)] 0 ; 0 }, }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: #4 bytes(299..303),
- },
- Ident {
- ident: "E",
- span: #4 bytes(304..305),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "V",
- span: #4 bytes(320..321),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #4 bytes(322..323),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: #4 bytes(326..329),
- },
- Ident {
- ident: "_",
- span: #4 bytes(330..331),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #4 bytes(332..333),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: #0 bytes(541..542),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: #0 bytes(543..548),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "warnings",
- span: #0 bytes(549..557),
- },
- ],
- span: #0 bytes(548..558),
- },
- ],
- span: #0 bytes(542..559),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: #0 bytes(541..542),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: #0 bytes(543..548),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "warnings",
- span: #0 bytes(549..557),
- },
- ],
- span: #0 bytes(548..558),
- },
- ],
- span: #0 bytes(542..559),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #0 bytes(560..561),
- },
- ],
- span: #4 bytes(334..339),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: #4 bytes(339..340),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #4 bytes(341..342),
- },
- ],
- span: #4 bytes(324..344),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: #4 bytes(344..345),
- },
- ],
- span: #4 bytes(306..355),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0; } ; 0 }, }
-PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 } ; 0 }, }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: #8 bytes(423..427),
- },
- Ident {
- ident: "E",
- span: #8 bytes(428..429),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "V",
- span: #8 bytes(444..445),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #8 bytes(446..447),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: #8 bytes(450..453),
- },
- Ident {
- ident: "_",
- span: #8 bytes(454..455),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #8 bytes(456..457),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #0 bytes(578..579),
- },
- ],
- span: #8 bytes(460..465),
- },
- ],
- span: #8 bytes(458..467),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: #8 bytes(467..468),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #8 bytes(469..470),
- },
- ],
- span: #8 bytes(448..472),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: #8 bytes(472..473),
- },
- ],
- span: #8 bytes(430..483),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { {} } ; 0 }, }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: #12 bytes(423..427),
- },
- Ident {
- ident: "E",
- span: #12 bytes(428..429),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "V",
- span: #12 bytes(444..445),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #12 bytes(446..447),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: #12 bytes(450..453),
- },
- Ident {
- ident: "_",
- span: #12 bytes(454..455),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #12 bytes(456..457),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: #0 bytes(596..598),
- },
- ],
- span: #12 bytes(460..465),
- },
- ],
- span: #12 bytes(458..467),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: #12 bytes(467..468),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #12 bytes(469..470),
- },
- ],
- span: #12 bytes(448..472),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: #12 bytes(472..473),
- },
- ],
- span: #12 bytes(430..483),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH; } ; 0 }, }
-PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH } ; 0 }, }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: #16 bytes(423..427),
- },
- Ident {
- ident: "E",
- span: #16 bytes(428..429),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "V",
- span: #16 bytes(444..445),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #16 bytes(446..447),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: #16 bytes(450..453),
- },
- Ident {
- ident: "_",
- span: #16 bytes(454..455),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #16 bytes(456..457),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "PATH",
- span: #0 bytes(615..619),
- },
- ],
- span: #16 bytes(460..465),
- },
- ],
- span: #16 bytes(458..467),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: #16 bytes(467..468),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #16 bytes(469..470),
- },
- ],
- span: #16 bytes(448..472),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: #16 bytes(472..473),
- },
- ],
- span: #16 bytes(430..483),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { 0 + 1; } ; 0 }, }
-PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { 0 + 1 } ; 0 }, }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: #20 bytes(423..427),
- },
- Ident {
- ident: "E",
- span: #20 bytes(428..429),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "V",
- span: #20 bytes(444..445),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #20 bytes(446..447),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: #20 bytes(450..453),
- },
- Ident {
- ident: "_",
- span: #20 bytes(454..455),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #20 bytes(456..457),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #0 bytes(636..637),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: #0 bytes(638..639),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: #0 bytes(640..641),
- },
- ],
- span: #20 bytes(460..465),
- },
- ],
- span: #20 bytes(458..467),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: #20 bytes(467..468),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #20 bytes(469..470),
- },
- ],
- span: #20 bytes(448..472),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: #20 bytes(472..473),
- },
- ],
- span: #20 bytes(430..483),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): enum E { V = { let _ = { PATH + 1; } ; 0 }, }
-PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): enum E { V = { let _ = { PATH + 1 } ; 0 }, }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: #24 bytes(423..427),
- },
- Ident {
- ident: "E",
- span: #24 bytes(428..429),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "V",
- span: #24 bytes(444..445),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #24 bytes(446..447),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: #24 bytes(450..453),
- },
- Ident {
- ident: "_",
- span: #24 bytes(454..455),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #24 bytes(456..457),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "PATH",
- span: #0 bytes(658..662),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: #0 bytes(663..664),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: #0 bytes(665..666),
- },
- ],
- span: #24 bytes(460..465),
- },
- ],
- span: #24 bytes(458..467),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: #24 bytes(467..468),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #24 bytes(469..470),
- },
- ],
- span: #24 bytes(448..472),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: #24 bytes(472..473),
- },
- ],
- span: #24 bytes(430..483),
- },
-]
diff --git a/src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs b/src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs
deleted file mode 100644
index a6e64e1b1..000000000
--- a/src/test/ui/proc-macro/extern-prelude-extern-crate-proc-macro.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// edition:2018
-
-extern crate proc_macro;
-use proc_macro::TokenStream; // OK
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/gen-lifetime-token.rs b/src/test/ui/proc-macro/gen-lifetime-token.rs
deleted file mode 100644
index 588bd2b76..000000000
--- a/src/test/ui/proc-macro/gen-lifetime-token.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// run-pass
-// aux-build:gen-lifetime-token.rs
-
-extern crate gen_lifetime_token as bar;
-
-bar::bar!();
-
-fn main() {
- let x: &'static i32 = FOO;
- assert_eq!(*x, 1);
-}
diff --git a/src/test/ui/proc-macro/gen-macro-rules-hygiene.rs b/src/test/ui/proc-macro/gen-macro-rules-hygiene.rs
deleted file mode 100644
index 195bda82e..000000000
--- a/src/test/ui/proc-macro/gen-macro-rules-hygiene.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// `macro_rules` items produced by transparent macros have correct hygiene in basic cases.
-// Local variables and labels are hygienic, items are not hygienic.
-// `$crate` refers to the crate that defines `macro_rules` and not the outer transparent macro.
-
-// aux-build:gen-macro-rules-hygiene.rs
-
-#[macro_use]
-extern crate gen_macro_rules_hygiene;
-
-struct ItemUse;
-
-gen_macro_rules!();
-//~^ ERROR use of undeclared label `'label_use`
-//~| ERROR cannot find value `local_use` in this scope
-
-fn main() {
- 'label_use: loop {
- let local_use = 1;
- generated!();
- ItemDef; // OK
- local_def; //~ ERROR cannot find value `local_def` in this scope
- }
-}
diff --git a/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr b/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr
deleted file mode 100644
index df7c4f72e..000000000
--- a/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr
+++ /dev/null
@@ -1,32 +0,0 @@
-error[E0426]: use of undeclared label `'label_use`
- --> $DIR/gen-macro-rules-hygiene.rs:12:1
- |
-LL | gen_macro_rules!();
- | ^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
-...
-LL | generated!();
- | ------------ in this macro invocation
- |
- = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0425]: cannot find value `local_use` in this scope
- --> $DIR/gen-macro-rules-hygiene.rs:12:1
- |
-LL | gen_macro_rules!();
- | ^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
-...
-LL | generated!();
- | ------------ in this macro invocation
- |
- = note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0425]: cannot find value `local_def` in this scope
- --> $DIR/gen-macro-rules-hygiene.rs:21:9
- |
-LL | local_def;
- | ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0425, E0426.
-For more information about an error, try `rustc --explain E0425`.
diff --git a/src/test/ui/proc-macro/gen-macro-rules.rs b/src/test/ui/proc-macro/gen-macro-rules.rs
deleted file mode 100644
index 13ad27f93..000000000
--- a/src/test/ui/proc-macro/gen-macro-rules.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Derive macros can generate `macro_rules` items, regression test for issue #63651.
-
-// check-pass
-// aux-build:gen-macro-rules.rs
-
-extern crate gen_macro_rules as repro;
-
-#[derive(repro::repro)]
-pub struct S;
-
-m!(); // OK
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/generate-dollar-ident.rs b/src/test/ui/proc-macro/generate-dollar-ident.rs
deleted file mode 100644
index b838be9fb..000000000
--- a/src/test/ui/proc-macro/generate-dollar-ident.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Proc macros can generate token sequence `$ IDENT`
-// without it being recognized as an unknown macro variable.
-
-// check-pass
-// aux-build:generate-dollar-ident.rs
-
-extern crate generate_dollar_ident;
-use generate_dollar_ident::*;
-
-macro_rules! black_hole {
- ($($tt:tt)*) => {};
-}
-
-black_hole!($var);
-
-dollar_ident!(black_hole);
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/generate-mod.rs b/src/test/ui/proc-macro/generate-mod.rs
deleted file mode 100644
index 471f317ed..000000000
--- a/src/test/ui/proc-macro/generate-mod.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Modules generated by transparent proc macros still acts as barriers for names (issue #50504).
-
-// aux-build:generate-mod.rs
-
-extern crate generate_mod;
-
-struct FromOutside;
-
-generate_mod::check!(); //~ ERROR cannot find type `FromOutside` in this scope
- //~| ERROR cannot find type `Outer` in this scope
-
-#[generate_mod::check_attr] //~ ERROR cannot find type `FromOutside` in this scope
- //~| ERROR cannot find type `OuterAttr` in this scope
-struct S;
-
-#[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
- //~| ERROR cannot find type `OuterDerive` in this scope
- //~| WARN this was previously accepted
- //~| WARN this was previously accepted
-struct Z;
-
-fn inner_block() {
- #[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
- //~| ERROR cannot find type `OuterDerive` in this scope
- //~| WARN this was previously accepted
- //~| WARN this was previously accepted
- struct InnerZ;
-}
-
-#[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
-struct W;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr
deleted file mode 100644
index 39bf28dba..000000000
--- a/src/test/ui/proc-macro/generate-mod.stderr
+++ /dev/null
@@ -1,164 +0,0 @@
-error[E0412]: cannot find type `FromOutside` in this scope
- --> $DIR/generate-mod.rs:9:1
- |
-LL | generate_mod::check!();
- | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
- |
- = note: consider importing this struct:
- FromOutside
- = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0412]: cannot find type `Outer` in this scope
- --> $DIR/generate-mod.rs:9:1
- |
-LL | generate_mod::check!();
- | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
- |
- = note: consider importing this struct:
- Outer
- = note: this error originates in the macro `generate_mod::check` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0412]: cannot find type `FromOutside` in this scope
- --> $DIR/generate-mod.rs:12:1
- |
-LL | #[generate_mod::check_attr]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
- |
- = note: consider importing this struct:
- FromOutside
- = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0412]: cannot find type `OuterAttr` in this scope
- --> $DIR/generate-mod.rs:12:1
- |
-LL | #[generate_mod::check_attr]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
- |
- = note: consider importing this struct:
- OuterAttr
- = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: cannot find type `FromOutside` in this scope
- --> $DIR/generate-mod.rs:16:10
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: cannot find type `OuterDerive` in this scope
- --> $DIR/generate-mod.rs:16:10
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: cannot find type `FromOutside` in this scope
- --> $DIR/generate-mod.rs:23:14
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: cannot find type `OuterDerive` in this scope
- --> $DIR/generate-mod.rs:23:14
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0412`.
-Future incompatibility report: Future breakage diagnostic:
-error: cannot find type `FromOutside` in this scope
- --> $DIR/generate-mod.rs:16:10
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-Future breakage diagnostic:
-error: cannot find type `OuterDerive` in this scope
- --> $DIR/generate-mod.rs:16:10
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-Future breakage diagnostic:
-error: cannot find type `FromOutside` in this scope
- --> $DIR/generate-mod.rs:23:14
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-Future breakage diagnostic:
-error: cannot find type `OuterDerive` in this scope
- --> $DIR/generate-mod.rs:23:14
- |
-LL | #[derive(generate_mod::CheckDerive)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
- = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
- = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-Future breakage diagnostic:
-warning: cannot find type `FromOutside` in this scope
- --> $DIR/generate-mod.rs:30:10
- |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
-note: the lint level is defined here
- --> $DIR/generate-mod.rs:30:10
- |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: this warning originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-Future breakage diagnostic:
-warning: cannot find type `OuterDeriveLint` in this scope
- --> $DIR/generate-mod.rs:30:10
- |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
-note: the lint level is defined here
- --> $DIR/generate-mod.rs:30:10
- |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: this warning originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
-
diff --git a/src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs b/src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs
deleted file mode 100644
index 40c42d82f..000000000
--- a/src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:test-macros.rs
-
-#[macro_use(Empty)]
-extern crate test_macros;
-use test_macros::empty_attr as empty_helper;
-
-#[empty_helper] //~ ERROR `empty_helper` is ambiguous
- //~| WARN derive helper attribute is used before it is introduced
- //~| WARN this was previously accepted
-#[derive(Empty)]
-struct S;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr b/src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
deleted file mode 100644
index 9441cdcc8..000000000
--- a/src/test/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0659]: `empty_helper` is ambiguous
- --> $DIR/helper-attr-blocked-by-import-ambig.rs:7:3
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a derive helper attribute
-note: `empty_helper` could refer to the derive helper attribute defined here
- --> $DIR/helper-attr-blocked-by-import-ambig.rs:10:10
- |
-LL | #[derive(Empty)]
- | ^^^^^
-note: `empty_helper` could also refer to the attribute macro imported here
- --> $DIR/helper-attr-blocked-by-import-ambig.rs:5:5
- |
-LL | use test_macros::empty_attr as empty_helper;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: use `crate::empty_helper` to refer to this attribute macro unambiguously
-
-warning: derive helper attribute is used before it is introduced
- --> $DIR/helper-attr-blocked-by-import-ambig.rs:7:3
- |
-LL | #[empty_helper]
- | ^^^^^^^^^^^^
-...
-LL | #[derive(Empty)]
- | ----- the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
- = note: `#[warn(legacy_derive_helpers)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0659`.
diff --git a/src/test/ui/proc-macro/helper-attr-blocked-by-import.rs b/src/test/ui/proc-macro/helper-attr-blocked-by-import.rs
deleted file mode 100644
index 2e20a3de6..000000000
--- a/src/test/ui/proc-macro/helper-attr-blocked-by-import.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// aux-build:test-macros.rs
-
-#[macro_use(Empty)]
-extern crate test_macros;
-
-use self::one::*;
-use self::two::*;
-
-mod empty_helper {}
-
-mod one {
- use empty_helper;
-
- #[derive(Empty)]
- #[empty_helper]
- struct One;
-}
-
-mod two {
- use empty_helper;
-
- #[derive(Empty)]
- #[empty_helper]
- struct Two;
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/hygiene_example.rs b/src/test/ui/proc-macro/hygiene_example.rs
deleted file mode 100644
index 346ed1207..000000000
--- a/src/test/ui/proc-macro/hygiene_example.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// check-pass
-// aux-build:hygiene_example_codegen.rs
-// aux-build:hygiene_example.rs
-
-extern crate hygiene_example;
-use hygiene_example::hello;
-
-fn main() {
- mod hygiene_example {} // no conflict with `extern crate hygiene_example;` from the proc macro
- macro_rules! format { () => {} } // does not interfere with `format!` from the proc macro
- macro_rules! hello_helper { () => {} } // similarly does not intefere with the proc macro
-
- let string = "world"; // no conflict with `string` from the proc macro
- hello!(string);
- hello!(string);
-}
diff --git a/src/test/ui/proc-macro/illegal-proc-macro-derive-use.rs b/src/test/ui/proc-macro/illegal-proc-macro-derive-use.rs
deleted file mode 100644
index 4efd9e952..000000000
--- a/src/test/ui/proc-macro/illegal-proc-macro-derive-use.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-extern crate proc_macro;
-
-#[proc_macro_derive(Foo)]
-//~^ ERROR: only usable with crates of the `proc-macro` crate type
-pub fn foo(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
- a
-}
-
-// Issue #37590
-#[proc_macro_derive(Foo)]
-//~^ ERROR: the `#[proc_macro_derive]` attribute may only be used on bare functions
-pub struct Foo {
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/illegal-proc-macro-derive-use.stderr b/src/test/ui/proc-macro/illegal-proc-macro-derive-use.stderr
deleted file mode 100644
index c0930ab71..000000000
--- a/src/test/ui/proc-macro/illegal-proc-macro-derive-use.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
- --> $DIR/illegal-proc-macro-derive-use.rs:3:1
- |
-LL | #[proc_macro_derive(Foo)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: the `#[proc_macro_derive]` attribute may only be used on bare functions
- --> $DIR/illegal-proc-macro-derive-use.rs:10:1
- |
-LL | #[proc_macro_derive(Foo)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/proc-macro/import.rs b/src/test/ui/proc-macro/import.rs
deleted file mode 100644
index d1b1ff350..000000000
--- a/src/test/ui/proc-macro/import.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// aux-build:test-macros.rs
-
-extern crate test_macros;
-
-use test_macros::empty_derive;
-//~^ ERROR: unresolved import `test_macros::empty_derive`
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/import.stderr b/src/test/ui/proc-macro/import.stderr
deleted file mode 100644
index aae621193..000000000
--- a/src/test/ui/proc-macro/import.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0432]: unresolved import `test_macros::empty_derive`
- --> $DIR/import.rs:5:5
- |
-LL | use test_macros::empty_derive;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ no `empty_derive` in the root
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0432`.
diff --git a/src/test/ui/proc-macro/inert-attribute-order.rs b/src/test/ui/proc-macro/inert-attribute-order.rs
deleted file mode 100644
index f80796756..000000000
--- a/src/test/ui/proc-macro/inert-attribute-order.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Order of inert attributes, both built-in and custom is preserved during expansion.
-
-// check-pass
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-/// 1
-#[rustfmt::attr2]
-#[doc = "3"]
-#[print_attr(nodebug)]
-#[doc = "4"]
-#[rustfmt::attr5]
-/// 6
-#[print_attr(nodebug)]
-struct S;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/inert-attribute-order.stdout b/src/test/ui/proc-macro/inert-attribute-order.stdout
deleted file mode 100644
index cc2155459..000000000
--- a/src/test/ui/proc-macro/inert-attribute-order.stdout
+++ /dev/null
@@ -1,7 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): /// 1
-#[rustfmt :: attr2] #[doc = "3"] #[doc = "4"] #[rustfmt :: attr5] /// 6
-#[print_attr(nodebug)] struct S ;
-PRINT-ATTR RE-COLLECTED (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"]
-#[rustfmt :: attr5] #[doc = " 6"] #[print_attr(nodebug)] struct S ;
-PRINT-ATTR INPUT (DISPLAY): #[doc = " 1"] #[rustfmt :: attr2] #[doc = "3"] #[doc = "4"]
-#[rustfmt :: attr5] #[doc = " 6"] struct S ;
diff --git a/src/test/ui/proc-macro/inner-attr-non-inline-mod.rs b/src/test/ui/proc-macro/inner-attr-non-inline-mod.rs
deleted file mode 100644
index 30c2666df..000000000
--- a/src/test/ui/proc-macro/inner-attr-non-inline-mod.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// compile-flags: -Z span-debug
-// error-pattern:custom inner attributes are unstable
-// error-pattern:inner macro attributes are unstable
-// error-pattern:this was previously accepted
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-#[deny(unused_attributes)]
-mod module_with_attrs;
-//~^ ERROR non-inline modules in proc macro input are unstable
-//~| ERROR custom inner attributes are unstable
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/inner-attr-non-inline-mod.stderr b/src/test/ui/proc-macro/inner-attr-non-inline-mod.stderr
deleted file mode 100644
index 2d357d04d..000000000
--- a/src/test/ui/proc-macro/inner-attr-non-inline-mod.stderr
+++ /dev/null
@@ -1,40 +0,0 @@
-error[E0658]: inner macro attributes are unstable
- --> $DIR/module_with_attrs.rs:4:4
- |
-LL | #![print_attr]
- | ^^^^^^^^^^
- |
- = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
- = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
-
-error[E0658]: non-inline modules in proc macro input are unstable
- --> $DIR/inner-attr-non-inline-mod.rs:14:1
- |
-LL | mod module_with_attrs;
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: custom inner attributes are unstable
- --> $DIR/inner-attr-non-inline-mod.rs:14:1
- |
-LL | mod module_with_attrs;
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
- = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
-
-error: custom inner attributes are unstable
- --> $DIR/module_with_attrs.rs:3:4
- |
-LL | #![rustfmt::skip]
- | ^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
- = note: `#[deny(soft_unstable)]` on by default
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/proc-macro/inner-attr-non-inline-mod.stdout b/src/test/ui/proc-macro/inner-attr-non-inline-mod.stdout
deleted file mode 100644
index 6261d82e2..000000000
--- a/src/test/ui/proc-macro/inner-attr-non-inline-mod.stdout
+++ /dev/null
@@ -1,76 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): #[deny(unused_attributes)] mod module_with_attrs { #! [rustfmt :: skip] }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "deny",
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "unused_attributes",
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- ],
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- ],
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Ident {
- ident: "mod",
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Ident {
- ident: "module_with_attrs",
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustfmt",
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Punct {
- ch: ':',
- spacing: Joint,
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- Ident {
- ident: "skip",
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- ],
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
- ],
- span: $DIR/inner-attr-non-inline-mod.rs:14:1: 14:23 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/inner-attrs.rs b/src/test/ui/proc-macro/inner-attrs.rs
deleted file mode 100644
index 1000c9c75..000000000
--- a/src/test/ui/proc-macro/inner-attrs.rs
+++ /dev/null
@@ -1,87 +0,0 @@
-// gate-test-custom_inner_attributes
-// compile-flags: -Z span-debug --error-format human
-// aux-build:test-macros.rs
-// edition:2018
-
-#![feature(custom_inner_attributes)]
-#![feature(proc_macro_hygiene)]
-#![feature(stmt_expr_attributes)]
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-#[print_target_and_args(first)]
-#[print_target_and_args(second)]
-fn foo() {
- #![print_target_and_args(third)]
- #![print_target_and_args(fourth)]
-}
-
-#[print_target_and_args(mod_first)]
-#[print_target_and_args(mod_second)]
-mod inline_mod {
- #![print_target_and_args(mod_third)]
- #![print_target_and_args(mod_fourth)]
-}
-
-struct MyStruct {
- field: bool
-}
-
-#[derive(Print)]
-struct MyDerivePrint {
- field: [u8; {
- match true {
- _ => {
- #![cfg_attr(not(FALSE), rustc_dummy(third))]
- true
- }
- };
- 0
- }]
-}
-
-fn bar() {
- #[print_target_and_args(tuple_attrs)] (
- 3, 4, {
- #![cfg_attr(not(FALSE), rustc_dummy(innermost))]
- 5
- }
- );
-
- #[print_target_and_args(tuple_attrs)] (
- 3, 4, {
- #![cfg_attr(not(FALSE), rustc_dummy(innermost))]
- 5
- }
- );
-
- for _ in &[true] {
- #![print_attr] //~ ERROR expected non-macro inner attribute
- }
-
- let _ = {
- #![print_attr] //~ ERROR expected non-macro inner attribute
- };
-
- let _ = async {
- #![print_attr] //~ ERROR expected non-macro inner attribute
- };
-
- {
- #![print_attr] //~ ERROR expected non-macro inner attribute
- };
-}
-
-
-extern {
- fn weird_extern() {
- #![print_target_and_args_consume(tenth)]
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/inner-attrs.stderr b/src/test/ui/proc-macro/inner-attrs.stderr
deleted file mode 100644
index a332e143a..000000000
--- a/src/test/ui/proc-macro/inner-attrs.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: expected non-macro inner attribute, found attribute macro `print_attr`
- --> $DIR/inner-attrs.rs:64:12
- |
-LL | #![print_attr]
- | ^^^^^^^^^^ not a non-macro inner attribute
-
-error: expected non-macro inner attribute, found attribute macro `print_attr`
- --> $DIR/inner-attrs.rs:68:12
- |
-LL | #![print_attr]
- | ^^^^^^^^^^ not a non-macro inner attribute
-
-error: expected non-macro inner attribute, found attribute macro `print_attr`
- --> $DIR/inner-attrs.rs:72:12
- |
-LL | #![print_attr]
- | ^^^^^^^^^^ not a non-macro inner attribute
-
-error: expected non-macro inner attribute, found attribute macro `print_attr`
- --> $DIR/inner-attrs.rs:76:12
- |
-LL | #![print_attr]
- | ^^^^^^^^^^ not a non-macro inner attribute
-
-error: aborting due to 4 previous errors
-
diff --git a/src/test/ui/proc-macro/inner-attrs.stdout b/src/test/ui/proc-macro/inner-attrs.stdout
deleted file mode 100644
index ee8adf0b4..000000000
--- a/src/test/ui/proc-macro/inner-attrs.stdout
+++ /dev/null
@@ -1,956 +0,0 @@
-PRINT-ATTR_ARGS INPUT (DISPLAY): first
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "first",
- span: $DIR/inner-attrs.rs:17:25: 17:30 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second)] fn foo()
-{ #! [print_target_and_args(third)] #! [print_target_and_args(fourth)] }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:18:1: 18:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:18:3: 18:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "second",
- span: $DIR/inner-attrs.rs:18:25: 18:31 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:18:24: 18:32 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:18:2: 18:33 (#0),
- },
- Ident {
- ident: "fn",
- span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
- },
- Ident {
- ident: "foo",
- span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:20:5: 20:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:20:6: 20:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:20:8: 20:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "third",
- span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:20:29: 20:36 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:20:7: 20:37 (#0),
- },
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "fourth",
- span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): second
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "second",
- span: $DIR/inner-attrs.rs:18:25: 18:31 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): fn foo()
-{ #! [print_target_and_args(third)] #! [print_target_and_args(fourth)] }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
- },
- Ident {
- ident: "foo",
- span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:20:5: 20:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:20:6: 20:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:20:8: 20:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "third",
- span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:20:29: 20:36 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:20:7: 20:37 (#0),
- },
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "fourth",
- span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): third
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "third",
- span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): fn foo() { #! [print_target_and_args(fourth)] }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
- },
- Ident {
- ident: "foo",
- span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "fourth",
- span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): fourth
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fourth",
- span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): fn foo() {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
- },
- Ident {
- ident: "foo",
- span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): mod_first
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "mod_first",
- span: $DIR/inner-attrs.rs:24:25: 24:34 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(mod_second)] mod inline_mod
-{
- #! [print_target_and_args(mod_third)] #!
- [print_target_and_args(mod_fourth)]
-}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:25:1: 25:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:25:3: 25:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "mod_second",
- span: $DIR/inner-attrs.rs:25:25: 25:35 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:25:24: 25:36 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:25:2: 25:37 (#0),
- },
- Ident {
- ident: "mod",
- span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
- },
- Ident {
- ident: "inline_mod",
- span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:27:5: 27:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:27:6: 27:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:27:8: 27:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "mod_third",
- span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:27:29: 27:40 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:27:7: 27:41 (#0),
- },
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "mod_fourth",
- span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): mod_second
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "mod_second",
- span: $DIR/inner-attrs.rs:25:25: 25:35 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): mod inline_mod
-{
- #! [print_target_and_args(mod_third)] #!
- [print_target_and_args(mod_fourth)]
-}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "mod",
- span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
- },
- Ident {
- ident: "inline_mod",
- span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:27:5: 27:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:27:6: 27:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:27:8: 27:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "mod_third",
- span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:27:29: 27:40 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:27:7: 27:41 (#0),
- },
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "mod_fourth",
- span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): mod_third
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "mod_third",
- span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): mod inline_mod { #! [print_target_and_args(mod_fourth)] }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "mod",
- span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
- },
- Ident {
- ident: "inline_mod",
- span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "mod_fourth",
- span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): mod_fourth
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "mod_fourth",
- span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): mod inline_mod {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "mod",
- span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
- },
- Ident {
- ident: "inline_mod",
- span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): struct MyDerivePrint
-{
- field :
- [u8 ; { match true { _ => { #! [rustc_dummy(third)] true } } ; 0 }]
-}
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/inner-attrs.rs:36:1: 36:7 (#0),
- },
- Ident {
- ident: "MyDerivePrint",
- span: $DIR/inner-attrs.rs:36:8: 36:21 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "field",
- span: $DIR/inner-attrs.rs:37:5: 37:10 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:37:10: 37:11 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "u8",
- span: $DIR/inner-attrs.rs:37:13: 37:15 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:37:15: 37:16 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "match",
- span: $DIR/inner-attrs.rs:38:9: 38:14 (#0),
- },
- Ident {
- ident: "true",
- span: $DIR/inner-attrs.rs:38:15: 38:19 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "_",
- span: $DIR/inner-attrs.rs:39:13: 39:14 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:39:15: 39:16 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:39:16: 39:17 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:40:17: 40:18 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:40:18: 40:19 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/inner-attrs.rs:40:41: 40:52 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "third",
- span: $DIR/inner-attrs.rs:40:53: 40:58 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:40:52: 40:59 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:40:17: 40:18 (#0),
- },
- Ident {
- ident: "true",
- span: $DIR/inner-attrs.rs:41:17: 41:21 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:39:18: 42:14 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:38:20: 43:10 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:43:10: 43:11 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/inner-attrs.rs:44:9: 44:10 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:37:17: 45:6 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:37:12: 45:7 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:36:22: 46:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): tuple_attrs
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "tuple_attrs",
- span: $DIR/inner-attrs.rs:49:29: 49:40 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): (3, 4, { #! [cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "3",
- suffix: None,
- span: $DIR/inner-attrs.rs:50:9: 50:10 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:50:10: 50:11 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "4",
- suffix: None,
- span: $DIR/inner-attrs.rs:50:12: 50:13 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:50:13: 50:14 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:51:13: 51:14 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:51:14: 51:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg_attr",
- span: $DIR/inner-attrs.rs:51:16: 51:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/inner-attrs.rs:51:25: 51:28 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/inner-attrs.rs:51:29: 51:34 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:51:28: 51:35 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:51:35: 51:36 (#0),
- },
- Ident {
- ident: "rustc_dummy",
- span: $DIR/inner-attrs.rs:51:37: 51:48 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "innermost",
- span: $DIR/inner-attrs.rs:51:49: 51:58 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:51:48: 51:59 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:51:24: 51:60 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:51:15: 51:61 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "5",
- suffix: None,
- span: $DIR/inner-attrs.rs:52:13: 52:14 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:50:15: 53:10 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:49:43: 54:6 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:54:6: 54:7 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): tuple_attrs
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "tuple_attrs",
- span: $DIR/inner-attrs.rs:56:29: 56:40 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): (3, 4, { #! [cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 }) ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "3",
- suffix: None,
- span: $DIR/inner-attrs.rs:57:9: 57:10 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:57:10: 57:11 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "4",
- suffix: None,
- span: $DIR/inner-attrs.rs:57:12: 57:13 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:57:13: 57:14 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/inner-attrs.rs:58:13: 58:14 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:58:14: 58:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg_attr",
- span: $DIR/inner-attrs.rs:58:16: 58:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/inner-attrs.rs:58:25: 58:28 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/inner-attrs.rs:58:29: 58:34 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:58:28: 58:35 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:58:35: 58:36 (#0),
- },
- Ident {
- ident: "rustc_dummy",
- span: $DIR/inner-attrs.rs:58:37: 58:48 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "innermost",
- span: $DIR/inner-attrs.rs:58:49: 58:58 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:58:48: 58:59 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:58:24: 58:60 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:58:15: 58:61 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "5",
- suffix: None,
- span: $DIR/inner-attrs.rs:59:13: 59:14 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:57:15: 60:10 (#0),
- },
- ],
- span: $DIR/inner-attrs.rs:56:43: 61:6 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/inner-attrs.rs:61:6: 61:7 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): tenth
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "tenth",
- span: $DIR/inner-attrs.rs:83:42: 83:47 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): fn weird_extern() {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/inner-attrs.rs:82:5: 82:7 (#0),
- },
- Ident {
- ident: "weird_extern",
- span: $DIR/inner-attrs.rs:82:8: 82:20 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:82:20: 82:22 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/inner-attrs.rs:82:23: 84:6 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/input-interpolated.rs b/src/test/ui/proc-macro/input-interpolated.rs
deleted file mode 100644
index 5e49e330c..000000000
--- a/src/test/ui/proc-macro/input-interpolated.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Check what token streams proc macros see when interpolated tokens are passed to them as input.
-
-// check-pass
-// edition:2018
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! pass_ident {
- ($i:ident) => {
- fn f() {
- print_bang!($i);
- }
-
- #[print_attr]
- const $i: u8 = 0;
-
- #[derive(Print)]
- struct $i {}
- };
-}
-
-pass_ident!(A);
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/input-interpolated.stdout b/src/test/ui/proc-macro/input-interpolated.stdout
deleted file mode 100644
index 34566c780..000000000
--- a/src/test/ui/proc-macro/input-interpolated.stdout
+++ /dev/null
@@ -1,59 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): A
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Ident {
- ident: "A",
- span: #0 bytes(503..504),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): const A : u8 = 0 ;
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "const",
- span: #4 bytes(416..421),
- },
- Ident {
- ident: "A",
- span: #0 bytes(503..504),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: #4 bytes(424..425),
- },
- Ident {
- ident: "u8",
- span: #4 bytes(426..428),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: #4 bytes(429..430),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: #4 bytes(431..432),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: #4 bytes(432..433),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): struct A {}
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: #4 bytes(468..474),
- },
- Ident {
- ident: "A",
- span: #0 bytes(503..504),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: #4 bytes(478..480),
- },
-]
diff --git a/src/test/ui/proc-macro/invalid-attributes.rs b/src/test/ui/proc-macro/invalid-attributes.rs
deleted file mode 100644
index 6bbe022c6..000000000
--- a/src/test/ui/proc-macro/invalid-attributes.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-use proc_macro::TokenStream;
-
-#[proc_macro = "test"] //~ ERROR malformed `proc_macro` attribute
-pub fn a(a: TokenStream) -> TokenStream { a }
-
-#[proc_macro()] //~ ERROR malformed `proc_macro` attribute
-pub fn c(a: TokenStream) -> TokenStream { a }
-
-#[proc_macro(x)] //~ ERROR malformed `proc_macro` attribute
-pub fn d(a: TokenStream) -> TokenStream { a }
-
-#[proc_macro_attribute = "test"] //~ ERROR malformed `proc_macro_attribute` attribute
-pub fn e(_: TokenStream, a: TokenStream) -> TokenStream { a }
-
-#[proc_macro_attribute()] //~ ERROR malformed `proc_macro_attribute` attribute
-pub fn g(_: TokenStream, a: TokenStream) -> TokenStream { a }
-
-#[proc_macro_attribute(x)] //~ ERROR malformed `proc_macro_attribute` attribute
-pub fn h(_: TokenStream, a: TokenStream) -> TokenStream { a }
diff --git a/src/test/ui/proc-macro/invalid-attributes.stderr b/src/test/ui/proc-macro/invalid-attributes.stderr
deleted file mode 100644
index fe411fa5e..000000000
--- a/src/test/ui/proc-macro/invalid-attributes.stderr
+++ /dev/null
@@ -1,38 +0,0 @@
-error: malformed `proc_macro` attribute input
- --> $DIR/invalid-attributes.rs:10:1
- |
-LL | #[proc_macro = "test"]
- | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro]`
-
-error: malformed `proc_macro` attribute input
- --> $DIR/invalid-attributes.rs:13:1
- |
-LL | #[proc_macro()]
- | ^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro]`
-
-error: malformed `proc_macro` attribute input
- --> $DIR/invalid-attributes.rs:16:1
- |
-LL | #[proc_macro(x)]
- | ^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro]`
-
-error: malformed `proc_macro_attribute` attribute input
- --> $DIR/invalid-attributes.rs:19:1
- |
-LL | #[proc_macro_attribute = "test"]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_attribute]`
-
-error: malformed `proc_macro_attribute` attribute input
- --> $DIR/invalid-attributes.rs:22:1
- |
-LL | #[proc_macro_attribute()]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_attribute]`
-
-error: malformed `proc_macro_attribute` attribute input
- --> $DIR/invalid-attributes.rs:25:1
- |
-LL | #[proc_macro_attribute(x)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[proc_macro_attribute]`
-
-error: aborting due to 6 previous errors
-
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-1.rs b/src/test/ui/proc-macro/invalid-punct-ident-1.rs
deleted file mode 100644
index 9a1802737..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-1.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:invalid-punct-ident.rs
-// needs-unwind proc macro panics to report errors
-
-#[macro_use]
-extern crate invalid_punct_ident;
-
-invalid_punct!(); //~ ERROR proc macro panicked
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-1.stderr b/src/test/ui/proc-macro/invalid-punct-ident-1.stderr
deleted file mode 100644
index 78aa84401..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-1.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: proc macro panicked
- --> $DIR/invalid-punct-ident-1.rs:7:1
- |
-LL | invalid_punct!();
- | ^^^^^^^^^^^^^^^^
- |
- = help: message: unsupported character `'`'`
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-2.rs b/src/test/ui/proc-macro/invalid-punct-ident-2.rs
deleted file mode 100644
index afb6985e4..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-2.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:invalid-punct-ident.rs
-// needs-unwind proc macro panics to report errors
-
-#[macro_use]
-extern crate invalid_punct_ident;
-
-invalid_ident!(); //~ ERROR proc macro panicked
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-2.stderr b/src/test/ui/proc-macro/invalid-punct-ident-2.stderr
deleted file mode 100644
index 66979e756..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-2.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: proc macro panicked
- --> $DIR/invalid-punct-ident-2.rs:7:1
- |
-LL | invalid_ident!();
- | ^^^^^^^^^^^^^^^^
- |
- = help: message: `"*"` is not a valid identifier
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-3.rs b/src/test/ui/proc-macro/invalid-punct-ident-3.rs
deleted file mode 100644
index ff83695c5..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-3.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:invalid-punct-ident.rs
-// needs-unwind proc macro panics to report errors
-
-#[macro_use]
-extern crate invalid_punct_ident;
-
-invalid_raw_ident!(); //~ ERROR proc macro panicked
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-3.stderr b/src/test/ui/proc-macro/invalid-punct-ident-3.stderr
deleted file mode 100644
index c096bc8c0..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-3.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: proc macro panicked
- --> $DIR/invalid-punct-ident-3.rs:7:1
- |
-LL | invalid_raw_ident!();
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = help: message: `self` cannot be a raw identifier
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-4.rs b/src/test/ui/proc-macro/invalid-punct-ident-4.rs
deleted file mode 100644
index 2d2774bd1..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-4.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:invalid-punct-ident.rs
-// needs-unwind proc macro panics to report errors
-
-#[macro_use]
-extern crate invalid_punct_ident;
-
-lexer_failure!();
-//~^ ERROR proc macro panicked
-//~| ERROR unexpected closing delimiter: `)`
-
-fn main() {
- let _recovery_witness: () = 0; //~ ERROR mismatched types
-}
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr
deleted file mode 100644
index ab4116141..000000000
--- a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error: unexpected closing delimiter: `)`
- --> $DIR/invalid-punct-ident-4.rs:7:1
- |
-LL | lexer_failure!();
- | ^^^^^^^^^^^^^^^^ unexpected closing delimiter
- |
- = note: this error originates in the macro `lexer_failure` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: proc macro panicked
- --> $DIR/invalid-punct-ident-4.rs:7:1
- |
-LL | lexer_failure!();
- | ^^^^^^^^^^^^^^^^
-
-error[E0308]: mismatched types
- --> $DIR/invalid-punct-ident-4.rs:12:33
- |
-LL | let _recovery_witness: () = 0;
- | -- ^ expected `()`, found integer
- | |
- | expected due to this
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/is-available.rs b/src/test/ui/proc-macro/is-available.rs
deleted file mode 100644
index b32bb61b4..000000000
--- a/src/test/ui/proc-macro/is-available.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-
-extern crate proc_macro;
-
-// aux-build:is-available.rs
-extern crate is_available;
-
-fn main() {
- let a = proc_macro::is_available();
- let b = is_available::from_inside_proc_macro!();
- let c = proc_macro::is_available();
- assert!(!a);
- assert!(b);
- assert!(!c);
-}
diff --git a/src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
deleted file mode 100644
index a0d619c45..000000000
--- a/src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// aux-build:issue-104884.rs
-
-use std::collections::BinaryHeap;
-
-#[macro_use]
-extern crate issue_104884;
-
-#[derive(PartialEq, Eq, PartialOrd, Ord)]
-struct PriorityQueueEntry<T> {
- value: T,
-}
-
-#[derive(PartialOrd, AddImpl)]
-//~^ ERROR can't compare `PriorityQueue<T>` with `PriorityQueue<T>`
-//~| ERROR the trait bound `PriorityQueue<T>: Eq` is not satisfied
-//~| ERROR can't compare `T` with `T`
-
-struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>);
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr b/src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
deleted file mode 100644
index ac49e04e3..000000000
--- a/src/test/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr
+++ /dev/null
@@ -1,48 +0,0 @@
-error[E0277]: can't compare `PriorityQueue<T>` with `PriorityQueue<T>`
- --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:10
- |
-LL | #[derive(PartialOrd, AddImpl)]
- | ^^^^^^^^^^ no implementation for `PriorityQueue<T> == PriorityQueue<T>`
- |
- = help: the trait `PartialEq` is not implemented for `PriorityQueue<T>`
-note: required by a bound in `PartialOrd`
- --> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
- | ^^^^^^^^^^^^^^ required by this bound in `PartialOrd`
- = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: the trait bound `PriorityQueue<T>: Eq` is not satisfied
- --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
- |
-LL | #[derive(PartialOrd, AddImpl)]
- | ^^^^^^^ the trait `Eq` is not implemented for `PriorityQueue<T>`
- |
-note: required by a bound in `Ord`
- --> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait Ord: Eq + PartialOrd<Self> {
- | ^^ required by this bound in `Ord`
- = note: this error originates in the derive macro `AddImpl` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0277]: can't compare `T` with `T`
- --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22
- |
-LL | #[derive(PartialOrd, AddImpl)]
- | ^^^^^^^ no implementation for `T < T` and `T > T`
- |
-note: required for `PriorityQueue<T>` to implement `PartialOrd`
- --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:10
- |
-LL | #[derive(PartialOrd, AddImpl)]
- | ^^^^^^^^^^
-note: required by a bound in `Ord`
- --> $SRC_DIR/core/src/cmp.rs:LL:COL
- |
-LL | pub trait Ord: Eq + PartialOrd<Self> {
- | ^^^^^^^^^^^^^^^^ required by this bound in `Ord`
- = note: this error originates in the derive macro `AddImpl` which comes from the expansion of the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/proc-macro/issue-36935.rs b/src/test/ui/proc-macro/issue-36935.rs
deleted file mode 100644
index 03cdfa05e..000000000
--- a/src/test/ui/proc-macro/issue-36935.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// aux-build:test-macros.rs
-// needs-unwind proc macro panics to report errors
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive(Identity, Panic)] //~ ERROR proc-macro derive panicked
-struct Baz {
- //~^ ERROR the name `Baz` is defined multiple times
- a: i32,
- b: i32,
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-36935.stderr b/src/test/ui/proc-macro/issue-36935.stderr
deleted file mode 100644
index 122903798..000000000
--- a/src/test/ui/proc-macro/issue-36935.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error[E0428]: the name `Baz` is defined multiple times
- --> $DIR/issue-36935.rs:8:1
- |
-LL | struct Baz {
- | ^^^^^^^^^^
- | |
- | `Baz` redefined here
- | previous definition of the type `Baz` here
- |
- = note: `Baz` must be defined only once in the type namespace of this module
-
-error: proc-macro derive panicked
- --> $DIR/issue-36935.rs:7:20
- |
-LL | #[derive(Identity, Panic)]
- | ^^^^^
- |
- = help: message: panic-derive
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/ui/proc-macro/issue-37788.rs b/src/test/ui/proc-macro/issue-37788.rs
deleted file mode 100644
index 73b1f0d58..000000000
--- a/src/test/ui/proc-macro/issue-37788.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-fn main() {
- // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`) does not ICE.
- std::cell::Cell::new(0) //~ ERROR mismatched types
-}
diff --git a/src/test/ui/proc-macro/issue-37788.stderr b/src/test/ui/proc-macro/issue-37788.stderr
deleted file mode 100644
index 345520d48..000000000
--- a/src/test/ui/proc-macro/issue-37788.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-37788.rs:8:5
- |
-LL | fn main() {
- | - expected `()` because of default return type
-LL | // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`) does not ICE.
-LL | std::cell::Cell::new(0)
- | ^^^^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here: `;`
- | |
- | expected `()`, found struct `Cell`
- |
- = note: expected unit type `()`
- found struct `Cell<{integer}>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/issue-38586.rs b/src/test/ui/proc-macro/issue-38586.rs
deleted file mode 100644
index 24e88ed93..000000000
--- a/src/test/ui/proc-macro/issue-38586.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:issue-38586.rs
-
-#[macro_use]
-extern crate issue_38586;
-
-#[derive(A)] //~ ERROR `foo`
-struct A;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-38586.stderr b/src/test/ui/proc-macro/issue-38586.stderr
deleted file mode 100644
index ddd0a0874..000000000
--- a/src/test/ui/proc-macro/issue-38586.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0425]: cannot find value `foo` in this scope
- --> $DIR/issue-38586.rs:6:10
- |
-LL | #[derive(A)]
- | ^ not found in this scope
- |
- = note: this error originates in the derive macro `A` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/proc-macro/issue-39889.rs b/src/test/ui/proc-macro/issue-39889.rs
deleted file mode 100644
index 69bfb4f3c..000000000
--- a/src/test/ui/proc-macro/issue-39889.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// run-pass
-
-#![allow(dead_code, unused_macros)]
-// aux-build:issue-39889.rs
-
-extern crate issue_39889;
-use issue_39889::Issue39889;
-
-#[derive(Issue39889)]
-struct S;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-42708.rs b/src/test/ui/proc-macro/issue-42708.rs
deleted file mode 100644
index e8f445aaa..000000000
--- a/src/test/ui/proc-macro/issue-42708.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// run-pass
-// aux-build:issue-42708.rs
-
-#![feature(decl_macro)]
-#![allow(unused)]
-
-extern crate issue_42708;
-
-macro m() {
- #[derive(issue_42708::Test)]
- struct S { x: () }
-
- #[issue_42708::attr_test]
- struct S2 { x: () }
-
- #[derive(Clone)]
- struct S3 { x: () }
-
- fn g(s: S, s2: S2, s3: S3) {
- (s.x, s2.x, s3.x);
- }
-}
-
-m!();
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-50061.rs b/src/test/ui/proc-macro/issue-50061.rs
deleted file mode 100644
index 01c6b80b4..000000000
--- a/src/test/ui/proc-macro/issue-50061.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// run-pass
-
-#![allow(path_statements)]
-// aux-build:issue-50061.rs
-
-#![feature(decl_macro)]
-
-extern crate issue_50061;
-
-macro inner(any_token $v: tt) {
- $v
-}
-
-macro outer($v: tt) {
- inner!(any_token $v)
-}
-
-#[issue_50061::check]
-fn main() {
- //! this doc comment forces roundtrip through a string
- let checkit = 0;
- outer!(checkit);
-}
diff --git a/src/test/ui/proc-macro/issue-50493.rs b/src/test/ui/proc-macro/issue-50493.rs
deleted file mode 100644
index ce0e0839f..000000000
--- a/src/test/ui/proc-macro/issue-50493.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:issue-50493.rs
-
-#[macro_use]
-extern crate issue_50493;
-
-#[derive(Derive)]
-struct Restricted {
- pub(in restricted) field: usize, //~ visibilities can only be restricted to ancestor modules
-}
-
-mod restricted {}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-50493.stderr b/src/test/ui/proc-macro/issue-50493.stderr
deleted file mode 100644
index 23e103dbf..000000000
--- a/src/test/ui/proc-macro/issue-50493.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0742]: visibilities can only be restricted to ancestor modules
- --> $DIR/issue-50493.rs:8:12
- |
-LL | pub(in restricted) field: usize,
- | ^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0742`.
diff --git a/src/test/ui/proc-macro/issue-53481.rs b/src/test/ui/proc-macro/issue-53481.rs
deleted file mode 100644
index ae10a3baa..000000000
--- a/src/test/ui/proc-macro/issue-53481.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-mod m1 {
- use m2::Empty;
-
- #[derive(Empty)]
- struct A {}
-}
-
-mod m2 {
- pub type Empty = u8;
-
- #[derive(Empty)]
- #[empty_helper]
- struct B {}
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.rs b/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.rs
deleted file mode 100644
index a4161d4fc..000000000
--- a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Test that using a macro to replace the entire crate tree with a non-'mod' item errors out nicely.
-// `issue_59191::no_main` replaces whatever's passed in with `fn main() {}`.
-
-// edition:2018
-// aux-crate:issue_59191=issue-59191.rs
-// error-pattern: requires `sized` lang_item
-
-#![feature(custom_inner_attributes)]
-#![issue_59191::no_main]
-#![issue_59191::no_main]
diff --git a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr b/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
deleted file mode 100644
index f7516c7d3..000000000
--- a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: requires `sized` lang_item
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/issue-66286.rs b/src/test/ui/proc-macro/issue-66286.rs
deleted file mode 100644
index 2a67aeab4..000000000
--- a/src/test/ui/proc-macro/issue-66286.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:issue-66286.rs
-
-// Regression test for #66286.
-
-extern crate issue_66286;
-
-#[issue_66286::vec_ice]
-pub extern fn foo(_: Vec(u32)) -> u32 {
- //~^ ERROR: parenthesized type parameters may only be used with a `Fn` trait
- 0
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-66286.stderr b/src/test/ui/proc-macro/issue-66286.stderr
deleted file mode 100644
index fe2464b3b..000000000
--- a/src/test/ui/proc-macro/issue-66286.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
- --> $DIR/issue-66286.rs:8:22
- |
-LL | pub extern fn foo(_: Vec(u32)) -> u32 {
- | ^^^^^^^^ only `Fn` traits may use parentheses
- |
-help: use angle brackets instead
- |
-LL | pub extern fn foo(_: Vec<u32>) -> u32 {
- | ~ ~
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0214`.
diff --git a/src/test/ui/proc-macro/issue-73933-procedural-masquerade.rs b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.rs
deleted file mode 100644
index a573c6e1c..000000000
--- a/src/test/ui/proc-macro/issue-73933-procedural-masquerade.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// aux-build:test-macros.rs
-// check-pass
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive(Print)]
-enum ProceduralMasqueradeDummyType {
- Input
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stdout b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stdout
deleted file mode 100644
index 8cd981e03..000000000
--- a/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stdout
+++ /dev/null
@@ -1,21 +0,0 @@
-PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: #0 bytes(100..104),
- },
- Ident {
- ident: "ProceduralMasqueradeDummyType",
- span: #0 bytes(105..134),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "Input",
- span: #0 bytes(141..146),
- },
- ],
- span: #0 bytes(135..148),
- },
-]
diff --git a/src/test/ui/proc-macro/issue-75734-pp-paren.rs b/src/test/ui/proc-macro/issue-75734-pp-paren.rs
deleted file mode 100644
index faa93787d..000000000
--- a/src/test/ui/proc-macro/issue-75734-pp-paren.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Regression test for issue #75734
-// Ensures that we don't lose tokens when pretty-printing would
-// normally insert extra parentheses.
-
-// check-pass
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! mul_2 {
- ($val:expr) => {
- print_bang!($val * 2);
- };
-}
-
-
-#[print_attr]
-fn main() {
- &|_: u8| {};
- mul_2!(1 + 1);
-}
diff --git a/src/test/ui/proc-macro/issue-75734-pp-paren.stdout b/src/test/ui/proc-macro/issue-75734-pp-paren.stdout
deleted file mode 100644
index 0fda6654f..000000000
--- a/src/test/ui/proc-macro/issue-75734-pp-paren.stdout
+++ /dev/null
@@ -1,134 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): fn main() { & | _ : u8 | {} ; mul_2! (1 + 1) ; }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/issue-75734-pp-paren.rs:23:1: 23:3 (#0),
- },
- Ident {
- ident: "main",
- span: $DIR/issue-75734-pp-paren.rs:23:4: 23:8 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-75734-pp-paren.rs:23:8: 23:10 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '&',
- spacing: Joint,
- span: $DIR/issue-75734-pp-paren.rs:24:5: 24:6 (#0),
- },
- Punct {
- ch: '|',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:24:6: 24:7 (#0),
- },
- Ident {
- ident: "_",
- span: $DIR/issue-75734-pp-paren.rs:24:7: 24:8 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:24:8: 24:9 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/issue-75734-pp-paren.rs:24:10: 24:12 (#0),
- },
- Punct {
- ch: '|',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:24:12: 24:13 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-75734-pp-paren.rs:24:14: 24:16 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:24:16: 24:17 (#0),
- },
- Ident {
- ident: "mul_2",
- span: $DIR/issue-75734-pp-paren.rs:25:5: 25:10 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:25:10: 25:11 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/issue-75734-pp-paren.rs:25:12: 25:13 (#0),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:25:14: 25:15 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/issue-75734-pp-paren.rs:25:16: 25:17 (#0),
- },
- ],
- span: $DIR/issue-75734-pp-paren.rs:25:11: 25:18 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:25:18: 25:19 (#0),
- },
- ],
- span: $DIR/issue-75734-pp-paren.rs:23:11: 26:2 (#0),
- },
-]
-PRINT-BANG INPUT (DISPLAY): 1 + 1 * 2
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/issue-75734-pp-paren.rs:25:12: 25:13 (#0),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:25:14: 25:15 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/issue-75734-pp-paren.rs:25:16: 25:17 (#0),
- },
- ],
- span: $DIR/issue-75734-pp-paren.rs:17:21: 17:25 (#7),
- },
- Punct {
- ch: '*',
- spacing: Alone,
- span: $DIR/issue-75734-pp-paren.rs:17:26: 17:27 (#7),
- },
- Literal {
- kind: Integer,
- symbol: "2",
- suffix: None,
- span: $DIR/issue-75734-pp-paren.rs:17:28: 17:29 (#7),
- },
-]
diff --git a/src/test/ui/proc-macro/issue-75801.rs b/src/test/ui/proc-macro/issue-75801.rs
deleted file mode 100644
index b07cde0fa..000000000
--- a/src/test/ui/proc-macro/issue-75801.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// aux-build: issue-75801.rs
-
-// Regression test for #75801.
-
-#[macro_use]
-extern crate issue_75801;
-
-macro_rules! foo {
- ($arg:expr) => {
- #[foo]
- fn bar() {
- let _bar: u32 = $arg;
- }
- };
-}
-
-foo!("baz"); //~ ERROR: mismatched types [E0308]
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-75801.stderr b/src/test/ui/proc-macro/issue-75801.stderr
deleted file mode 100644
index ee0a9bd77..000000000
--- a/src/test/ui/proc-macro/issue-75801.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/issue-75801.rs:17:6
- |
-LL | let _bar: u32 = $arg;
- | --- expected due to this
-...
-LL | foo!("baz");
- | ^^^^^ expected `u32`, found `&str`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/issue-75930-derive-cfg.rs b/src/test/ui/proc-macro/issue-75930-derive-cfg.rs
deleted file mode 100644
index ef56e8e02..000000000
--- a/src/test/ui/proc-macro/issue-75930-derive-cfg.rs
+++ /dev/null
@@ -1,74 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug --error-format human
-// aux-build:test-macros.rs
-
-// Regression test for issue #75930
-// Tests that we cfg-strip all targets before invoking
-// a derive macro
-// We need '--error-format human' to stop compiletest from
-// trying to interpret proc-macro output as JSON messages
-// (a pretty-printed struct may cause a line to start with '{' )
-// FIXME: We currently lose spans here (see issue #43081)
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-#[print_helper(a)] //~ WARN derive helper attribute is used before it is introduced
- //~| WARN this was previously accepted
-#[cfg_attr(not(FALSE), allow(dead_code))]
-#[print_attr]
-#[derive(Print)]
-#[print_helper(b)]
-struct Foo<#[cfg(FALSE)] A, B> {
- #[cfg(FALSE)] first: String,
- #[cfg_attr(FALSE, deny(warnings))] second: bool,
- third: [u8; {
- #[cfg(FALSE)] struct Bar;
- #[cfg(not(FALSE))] struct Inner;
- #[cfg(FALSE)] let a = 25;
- match true {
- #[cfg(FALSE)] true => {},
- #[cfg_attr(not(FALSE), allow(warnings))] false => {},
- _ => {}
- };
-
- #[print_helper(should_be_removed)]
- fn removed_fn() {
- #![cfg(FALSE)]
- }
-
- #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn() {
- #![cfg(not(FALSE))]
- let my_val = true;
- }
-
- enum TupleEnum {
- Foo(
- #[cfg(FALSE)] u8,
- #[cfg(FALSE)] bool,
- #[cfg(not(FALSE))] i32,
- #[cfg(FALSE)] String, u8
- )
- }
-
- struct TupleStruct(
- #[cfg(FALSE)] String,
- #[cfg(not(FALSE))] i32,
- #[cfg(FALSE)] bool,
- u8
- );
-
- fn plain_removed_fn() {
- #![cfg_attr(not(FALSE), cfg(FALSE))]
- }
-
- 0
- }],
- #[print_helper(d)]
- fourth: B
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-75930-derive-cfg.stderr b/src/test/ui/proc-macro/issue-75930-derive-cfg.stderr
deleted file mode 100644
index 6d1efb0dc..000000000
--- a/src/test/ui/proc-macro/issue-75930-derive-cfg.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-warning: derive helper attribute is used before it is introduced
- --> $DIR/issue-75930-derive-cfg.rs:19:3
- |
-LL | #[print_helper(a)]
- | ^^^^^^^^^^^^
-...
-LL | #[derive(Print)]
- | ----- the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
- = note: `#[warn(legacy_derive_helpers)]` on by default
-
-warning: derive helper attribute is used before it is introduced
- --> $DIR/issue-75930-derive-cfg.rs:19:3
- |
-LL | #[print_helper(a)]
- | ^^^^^^^^^^^^
-...
-LL | #[derive(Print)]
- | ----- the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-
-warning: 2 warnings emitted
-
diff --git a/src/test/ui/proc-macro/issue-75930-derive-cfg.stdout b/src/test/ui/proc-macro/issue-75930-derive-cfg.stdout
deleted file mode 100644
index 83afd0d3e..000000000
--- a/src/test/ui/proc-macro/issue-75930-derive-cfg.stdout
+++ /dev/null
@@ -1,1904 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[derive(Print)] #[print_helper(b)]
-struct Foo < #[cfg(FALSE)] A, B >
-{
- #[cfg(FALSE)] first : String, #[cfg_attr(FALSE, deny(warnings))] second :
- bool, third :
- [u8 ;
- {
- #[cfg(FALSE)] struct Bar ; #[cfg(not(FALSE))] struct Inner ;
- #[cfg(FALSE)] let a = 25 ; match true
- {
- #[cfg(FALSE)] true => {}, #[cfg_attr(not(FALSE), allow(warnings))]
- false => {}, _ => {}
- } ; #[print_helper(should_be_removed)] fn removed_fn()
- { #! [cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn()
- { #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
- {
- Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
- #[cfg(FALSE)] String, u8)
- } struct
- TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
- #[cfg(FALSE)] bool, u8) ; fn plain_removed_fn()
- { #! [cfg_attr(not(FALSE), cfg(FALSE))] } 0
- }], #[print_helper(d)] fourth : B
-}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:19:1: 19:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:19:3: 19:15 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "a",
- span: $DIR/issue-75930-derive-cfg.rs:19:16: 19:17 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:19:15: 19:18 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:19:2: 19:19 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:21:1: 21:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/issue-75930-derive-cfg.rs:21:24: 21:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "dead_code",
- span: $DIR/issue-75930-derive-cfg.rs:21:30: 21:39 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:21:29: 21:40 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:21:1: 21:2 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:23:1: 23:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "derive",
- span: $DIR/issue-75930-derive-cfg.rs:23:3: 23:9 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "Print",
- span: $DIR/issue-75930-derive-cfg.rs:23:10: 23:15 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:23:9: 23:16 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:23:2: 23:17 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:24:1: 24:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:24:3: 24:15 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "b",
- span: $DIR/issue-75930-derive-cfg.rs:24:16: 24:17 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:24:15: 24:18 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:24:2: 24:19 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-75930-derive-cfg.rs:25:1: 25:7 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/issue-75930-derive-cfg.rs:25:8: 25:11 (#0),
- },
- Punct {
- ch: '<',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:25:11: 25:12 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:25:12: 25:13 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:25:14: 25:17 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:25:18: 25:23 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:25:17: 25:24 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:25:13: 25:25 (#0),
- },
- Ident {
- ident: "A",
- span: $DIR/issue-75930-derive-cfg.rs:25:26: 25:27 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:25:27: 25:28 (#0),
- },
- Ident {
- ident: "B",
- span: $DIR/issue-75930-derive-cfg.rs:25:29: 25:30 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:25:30: 25:31 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:26:5: 26:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:26:7: 26:10 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:26:11: 26:16 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:26:10: 26:17 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:26:6: 26:18 (#0),
- },
- Ident {
- ident: "first",
- span: $DIR/issue-75930-derive-cfg.rs:26:19: 26:24 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:26:24: 26:25 (#0),
- },
- Ident {
- ident: "String",
- span: $DIR/issue-75930-derive-cfg.rs:26:26: 26:32 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:26:32: 26:33 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:27:5: 27:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg_attr",
- span: $DIR/issue-75930-derive-cfg.rs:27:7: 27:15 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:27:16: 27:21 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:27:21: 27:22 (#0),
- },
- Ident {
- ident: "deny",
- span: $DIR/issue-75930-derive-cfg.rs:27:23: 27:27 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "warnings",
- span: $DIR/issue-75930-derive-cfg.rs:27:28: 27:36 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:27:27: 27:37 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:27:15: 27:38 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:27:6: 27:39 (#0),
- },
- Ident {
- ident: "second",
- span: $DIR/issue-75930-derive-cfg.rs:27:40: 27:46 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:27:46: 27:47 (#0),
- },
- Ident {
- ident: "bool",
- span: $DIR/issue-75930-derive-cfg.rs:27:48: 27:52 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:27:52: 27:53 (#0),
- },
- Ident {
- ident: "third",
- span: $DIR/issue-75930-derive-cfg.rs:28:5: 28:10 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:28:10: 28:11 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "u8",
- span: $DIR/issue-75930-derive-cfg.rs:28:13: 28:15 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:28:15: 28:16 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:29:9: 29:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:29:11: 29:14 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:29:15: 29:20 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:29:14: 29:21 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:29:10: 29:22 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-75930-derive-cfg.rs:29:23: 29:29 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/issue-75930-derive-cfg.rs:29:30: 29:33 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:29:33: 29:34 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:30:9: 30:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:30:11: 30:14 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:30:15: 30:18 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:30:19: 30:24 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:30:18: 30:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:30:14: 30:26 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:30:10: 30:27 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-75930-derive-cfg.rs:30:28: 30:34 (#0),
- },
- Ident {
- ident: "Inner",
- span: $DIR/issue-75930-derive-cfg.rs:30:35: 30:40 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:30:40: 30:41 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:31:9: 31:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:31:11: 31:14 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:31:15: 31:20 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:31:14: 31:21 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:31:10: 31:22 (#0),
- },
- Ident {
- ident: "let",
- span: $DIR/issue-75930-derive-cfg.rs:31:23: 31:26 (#0),
- },
- Ident {
- ident: "a",
- span: $DIR/issue-75930-derive-cfg.rs:31:27: 31:28 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:31:29: 31:30 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "25",
- suffix: None,
- span: $DIR/issue-75930-derive-cfg.rs:31:31: 31:33 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:31:33: 31:34 (#0),
- },
- Ident {
- ident: "match",
- span: $DIR/issue-75930-derive-cfg.rs:32:9: 32:14 (#0),
- },
- Ident {
- ident: "true",
- span: $DIR/issue-75930-derive-cfg.rs:32:15: 32:19 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:33:13: 33:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:33:15: 33:18 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:33:19: 33:24 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:33:18: 33:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:33:14: 33:26 (#0),
- },
- Ident {
- ident: "true",
- span: $DIR/issue-75930-derive-cfg.rs:33:27: 33:31 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:33:32: 33:33 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:33:33: 33:34 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:33:35: 33:37 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:33:37: 33:38 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:34:13: 34:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg_attr",
- span: $DIR/issue-75930-derive-cfg.rs:34:15: 34:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:34:24: 34:27 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:34:28: 34:33 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:34:27: 34:34 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:34:34: 34:35 (#0),
- },
- Ident {
- ident: "allow",
- span: $DIR/issue-75930-derive-cfg.rs:34:36: 34:41 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "warnings",
- span: $DIR/issue-75930-derive-cfg.rs:34:42: 34:50 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:34:41: 34:51 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:34:23: 34:52 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:34:14: 34:53 (#0),
- },
- Ident {
- ident: "false",
- span: $DIR/issue-75930-derive-cfg.rs:34:54: 34:59 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:34:60: 34:61 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:34:61: 34:62 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:34:63: 34:65 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:34:65: 34:66 (#0),
- },
- Ident {
- ident: "_",
- span: $DIR/issue-75930-derive-cfg.rs:35:13: 35:14 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:35:15: 35:16 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:35:16: 35:17 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:35:18: 35:20 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:32:20: 36:10 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:36:10: 36:11 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:38:9: 38:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:38:11: 38:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "should_be_removed",
- span: $DIR/issue-75930-derive-cfg.rs:38:24: 38:41 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:38:23: 38:42 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:38:10: 38:43 (#0),
- },
- Ident {
- ident: "fn",
- span: $DIR/issue-75930-derive-cfg.rs:39:9: 39:11 (#0),
- },
- Ident {
- ident: "removed_fn",
- span: $DIR/issue-75930-derive-cfg.rs:39:12: 39:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:39:22: 39:24 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:40:13: 40:14 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:40:14: 40:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:40:16: 40:19 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:40:20: 40:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:40:19: 40:26 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:40:15: 40:27 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:39:25: 41:10 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:43:9: 43:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:43:11: 43:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "c",
- span: $DIR/issue-75930-derive-cfg.rs:43:24: 43:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:23: 43:26 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:10: 43:27 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:43:28: 43:29 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:43:30: 43:33 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:43:34: 43:37 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:43:38: 43:43 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:37: 43:44 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:33: 43:45 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:29: 43:46 (#0),
- },
- Ident {
- ident: "fn",
- span: $DIR/issue-75930-derive-cfg.rs:43:47: 43:49 (#0),
- },
- Ident {
- ident: "kept_fn",
- span: $DIR/issue-75930-derive-cfg.rs:43:50: 43:57 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:43:57: 43:59 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:44:13: 44:14 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:44:14: 44:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:44:16: 44:19 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:44:20: 44:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:44:24: 44:29 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:44:23: 44:30 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:44:19: 44:31 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:44:15: 44:32 (#0),
- },
- Ident {
- ident: "let",
- span: $DIR/issue-75930-derive-cfg.rs:45:13: 45:16 (#0),
- },
- Ident {
- ident: "my_val",
- span: $DIR/issue-75930-derive-cfg.rs:45:17: 45:23 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:45:24: 45:25 (#0),
- },
- Ident {
- ident: "true",
- span: $DIR/issue-75930-derive-cfg.rs:45:26: 45:30 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:45:30: 45:31 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:60: 46:10 (#0),
- },
- Ident {
- ident: "enum",
- span: $DIR/issue-75930-derive-cfg.rs:48:9: 48:13 (#0),
- },
- Ident {
- ident: "TupleEnum",
- span: $DIR/issue-75930-derive-cfg.rs:48:14: 48:23 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "Foo",
- span: $DIR/issue-75930-derive-cfg.rs:49:13: 49:16 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:50:17: 50:18 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:50:19: 50:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:50:23: 50:28 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:50:22: 50:29 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:50:18: 50:30 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/issue-75930-derive-cfg.rs:50:31: 50:33 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:50:33: 50:34 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:51:17: 51:18 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:51:19: 51:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:51:23: 51:28 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:51:22: 51:29 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:51:18: 51:30 (#0),
- },
- Ident {
- ident: "bool",
- span: $DIR/issue-75930-derive-cfg.rs:51:31: 51:35 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:51:35: 51:36 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:52:17: 52:18 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:52:19: 52:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:52:23: 52:26 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:52:27: 52:32 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:52:26: 52:33 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:52:22: 52:34 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:52:18: 52:35 (#0),
- },
- Ident {
- ident: "i32",
- span: $DIR/issue-75930-derive-cfg.rs:52:36: 52:39 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:52:39: 52:40 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:53:17: 53:18 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:53:19: 53:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:53:23: 53:28 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:53:22: 53:29 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:53:18: 53:30 (#0),
- },
- Ident {
- ident: "String",
- span: $DIR/issue-75930-derive-cfg.rs:53:31: 53:37 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:53:37: 53:38 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/issue-75930-derive-cfg.rs:53:39: 53:41 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:49:16: 54:14 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:48:24: 55:10 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-75930-derive-cfg.rs:57:9: 57:15 (#0),
- },
- Ident {
- ident: "TupleStruct",
- span: $DIR/issue-75930-derive-cfg.rs:57:16: 57:27 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:58:13: 58:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:58:15: 58:18 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:58:19: 58:24 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:58:18: 58:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:58:14: 58:26 (#0),
- },
- Ident {
- ident: "String",
- span: $DIR/issue-75930-derive-cfg.rs:58:27: 58:33 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:58:33: 58:34 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:59:13: 59:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:59:15: 59:18 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:59:19: 59:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:59:23: 59:28 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:59:22: 59:29 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:59:18: 59:30 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:59:14: 59:31 (#0),
- },
- Ident {
- ident: "i32",
- span: $DIR/issue-75930-derive-cfg.rs:59:32: 59:35 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:59:35: 59:36 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:60:13: 60:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:60:15: 60:18 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:60:19: 60:24 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:60:18: 60:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:60:14: 60:26 (#0),
- },
- Ident {
- ident: "bool",
- span: $DIR/issue-75930-derive-cfg.rs:60:27: 60:31 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:60:31: 60:32 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/issue-75930-derive-cfg.rs:61:13: 61:15 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:57:27: 62:10 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:62:10: 62:11 (#0),
- },
- Ident {
- ident: "fn",
- span: $DIR/issue-75930-derive-cfg.rs:64:9: 64:11 (#0),
- },
- Ident {
- ident: "plain_removed_fn",
- span: $DIR/issue-75930-derive-cfg.rs:64:12: 64:28 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:64:28: 64:30 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:65:13: 65:14 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:65:14: 65:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg_attr",
- span: $DIR/issue-75930-derive-cfg.rs:65:16: 65:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:65:25: 65:28 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:65:29: 65:34 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:65:28: 65:35 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:65:35: 65:36 (#0),
- },
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:65:37: 65:40 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:65:41: 65:46 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:65:40: 65:47 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:65:24: 65:48 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:65:15: 65:49 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:64:31: 66:10 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/issue-75930-derive-cfg.rs:68:9: 68:10 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:28:17: 69:6 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:28:12: 69:7 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:69:7: 69:8 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:70:5: 70:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:70:7: 70:19 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "d",
- span: $DIR/issue-75930-derive-cfg.rs:70:20: 70:21 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:70:19: 70:22 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:70:6: 70:23 (#0),
- },
- Ident {
- ident: "fourth",
- span: $DIR/issue-75930-derive-cfg.rs:71:5: 71:11 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:71:11: 71:12 (#0),
- },
- Ident {
- ident: "B",
- span: $DIR/issue-75930-derive-cfg.rs:71:13: 71:14 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:25:32: 72:2 (#0),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo < B >
-{
- second : bool, third :
- [u8 ;
- {
- #[cfg(not(FALSE))] struct Inner ; match true
- { #[allow(warnings)] false => {}, _ => {} } ; #[print_helper(c)]
- #[cfg(not(FALSE))] fn kept_fn()
- { #! [cfg(not(FALSE))] let my_val = true ; } enum TupleEnum
- { Foo(#[cfg(not(FALSE))] i32, u8) } struct
- TupleStruct(#[cfg(not(FALSE))] i32, u8) ; 0
- }], #[print_helper(d)] fourth : B
-}
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:19:1: 19:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:19:3: 19:15 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "a",
- span: $DIR/issue-75930-derive-cfg.rs:19:16: 19:17 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:19:15: 19:18 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:19:2: 19:19 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:21:1: 21:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/issue-75930-derive-cfg.rs:21:24: 21:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "dead_code",
- span: $DIR/issue-75930-derive-cfg.rs:21:30: 21:39 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:21:29: 21:40 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:21:1: 21:2 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:24:1: 24:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:24:3: 24:15 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "b",
- span: $DIR/issue-75930-derive-cfg.rs:24:16: 24:17 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:24:15: 24:18 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:24:2: 24:19 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-75930-derive-cfg.rs:25:1: 25:7 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/issue-75930-derive-cfg.rs:25:8: 25:11 (#0),
- },
- Punct {
- ch: '<',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:25:11: 25:12 (#0),
- },
- Ident {
- ident: "B",
- span: $DIR/issue-75930-derive-cfg.rs:25:29: 25:30 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:25:30: 25:31 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "second",
- span: $DIR/issue-75930-derive-cfg.rs:27:40: 27:46 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:27:46: 27:47 (#0),
- },
- Ident {
- ident: "bool",
- span: $DIR/issue-75930-derive-cfg.rs:27:48: 27:52 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:27:52: 27:53 (#0),
- },
- Ident {
- ident: "third",
- span: $DIR/issue-75930-derive-cfg.rs:28:5: 28:10 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:28:10: 28:11 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "u8",
- span: $DIR/issue-75930-derive-cfg.rs:28:13: 28:15 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:28:15: 28:16 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:30:9: 30:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:30:11: 30:14 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:30:15: 30:18 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:30:19: 30:24 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:30:18: 30:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:30:14: 30:26 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:30:10: 30:27 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-75930-derive-cfg.rs:30:28: 30:34 (#0),
- },
- Ident {
- ident: "Inner",
- span: $DIR/issue-75930-derive-cfg.rs:30:35: 30:40 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:30:40: 30:41 (#0),
- },
- Ident {
- ident: "match",
- span: $DIR/issue-75930-derive-cfg.rs:32:9: 32:14 (#0),
- },
- Ident {
- ident: "true",
- span: $DIR/issue-75930-derive-cfg.rs:32:15: 32:19 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:34:13: 34:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/issue-75930-derive-cfg.rs:34:36: 34:41 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "warnings",
- span: $DIR/issue-75930-derive-cfg.rs:34:42: 34:50 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:34:41: 34:51 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:34:13: 34:14 (#0),
- },
- Ident {
- ident: "false",
- span: $DIR/issue-75930-derive-cfg.rs:34:54: 34:59 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:34:60: 34:61 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:34:61: 34:62 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:34:63: 34:65 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:34:65: 34:66 (#0),
- },
- Ident {
- ident: "_",
- span: $DIR/issue-75930-derive-cfg.rs:35:13: 35:14 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:35:15: 35:16 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:35:16: 35:17 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:35:18: 35:20 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:32:20: 36:10 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:36:10: 36:11 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:43:9: 43:10 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:43:11: 43:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "c",
- span: $DIR/issue-75930-derive-cfg.rs:43:24: 43:25 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:23: 43:26 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:10: 43:27 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:43:28: 43:29 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:43:30: 43:33 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:43:34: 43:37 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:43:38: 43:43 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:37: 43:44 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:33: 43:45 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:29: 43:46 (#0),
- },
- Ident {
- ident: "fn",
- span: $DIR/issue-75930-derive-cfg.rs:43:47: 43:49 (#0),
- },
- Ident {
- ident: "kept_fn",
- span: $DIR/issue-75930-derive-cfg.rs:43:50: 43:57 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-75930-derive-cfg.rs:43:57: 43:59 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/issue-75930-derive-cfg.rs:44:13: 44:14 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:44:14: 44:15 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:44:16: 44:19 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:44:20: 44:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:44:24: 44:29 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:44:23: 44:30 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:44:19: 44:31 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:44:15: 44:32 (#0),
- },
- Ident {
- ident: "let",
- span: $DIR/issue-75930-derive-cfg.rs:45:13: 45:16 (#0),
- },
- Ident {
- ident: "my_val",
- span: $DIR/issue-75930-derive-cfg.rs:45:17: 45:23 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:45:24: 45:25 (#0),
- },
- Ident {
- ident: "true",
- span: $DIR/issue-75930-derive-cfg.rs:45:26: 45:30 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:45:30: 45:31 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:43:60: 46:10 (#0),
- },
- Ident {
- ident: "enum",
- span: $DIR/issue-75930-derive-cfg.rs:48:9: 48:13 (#0),
- },
- Ident {
- ident: "TupleEnum",
- span: $DIR/issue-75930-derive-cfg.rs:48:14: 48:23 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "Foo",
- span: $DIR/issue-75930-derive-cfg.rs:49:13: 49:16 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:52:17: 52:18 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:52:19: 52:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:52:23: 52:26 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:52:27: 52:32 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:52:26: 52:33 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:52:22: 52:34 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:52:18: 52:35 (#0),
- },
- Ident {
- ident: "i32",
- span: $DIR/issue-75930-derive-cfg.rs:52:36: 52:39 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:52:39: 52:40 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/issue-75930-derive-cfg.rs:53:39: 53:41 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:49:16: 54:14 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:48:24: 55:10 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-75930-derive-cfg.rs:57:9: 57:15 (#0),
- },
- Ident {
- ident: "TupleStruct",
- span: $DIR/issue-75930-derive-cfg.rs:57:16: 57:27 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:59:13: 59:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "cfg",
- span: $DIR/issue-75930-derive-cfg.rs:59:15: 59:18 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "not",
- span: $DIR/issue-75930-derive-cfg.rs:59:19: 59:22 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "FALSE",
- span: $DIR/issue-75930-derive-cfg.rs:59:23: 59:28 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:59:22: 59:29 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:59:18: 59:30 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:59:14: 59:31 (#0),
- },
- Ident {
- ident: "i32",
- span: $DIR/issue-75930-derive-cfg.rs:59:32: 59:35 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:59:35: 59:36 (#0),
- },
- Ident {
- ident: "u8",
- span: $DIR/issue-75930-derive-cfg.rs:61:13: 61:15 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:57:27: 62:10 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:62:10: 62:11 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/issue-75930-derive-cfg.rs:68:9: 68:10 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:28:17: 69:6 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:28:12: 69:7 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:69:7: 69:8 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:70:5: 70:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_helper",
- span: $DIR/issue-75930-derive-cfg.rs:70:7: 70:19 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "d",
- span: $DIR/issue-75930-derive-cfg.rs:70:20: 70:21 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:70:19: 70:22 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:70:6: 70:23 (#0),
- },
- Ident {
- ident: "fourth",
- span: $DIR/issue-75930-derive-cfg.rs:71:5: 71:11 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/issue-75930-derive-cfg.rs:71:11: 71:12 (#0),
- },
- Ident {
- ident: "B",
- span: $DIR/issue-75930-derive-cfg.rs:71:13: 71:14 (#0),
- },
- ],
- span: $DIR/issue-75930-derive-cfg.rs:25:32: 72:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/issue-76182-leading-vert-pat.rs b/src/test/ui/proc-macro/issue-76182-leading-vert-pat.rs
deleted file mode 100644
index 7d31de1d2..000000000
--- a/src/test/ui/proc-macro/issue-76182-leading-vert-pat.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-//
-// Regression test for issue #76182
-// Tests that we properly handle patterns with a leading vert
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate test_macros;
-
-#[test_macros::print_attr]
-fn main() {
- match () { | () => () }
-}
diff --git a/src/test/ui/proc-macro/issue-76182-leading-vert-pat.stdout b/src/test/ui/proc-macro/issue-76182-leading-vert-pat.stdout
deleted file mode 100644
index 09eb33f7e..000000000
--- a/src/test/ui/proc-macro/issue-76182-leading-vert-pat.stdout
+++ /dev/null
@@ -1,62 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): fn main() { match() { | () => () } }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/issue-76182-leading-vert-pat.rs:14:1: 14:3 (#0),
- },
- Ident {
- ident: "main",
- span: $DIR/issue-76182-leading-vert-pat.rs:14:4: 14:8 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-76182-leading-vert-pat.rs:14:8: 14:10 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "match",
- span: $DIR/issue-76182-leading-vert-pat.rs:15:5: 15:10 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-76182-leading-vert-pat.rs:15:11: 15:13 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '|',
- spacing: Alone,
- span: $DIR/issue-76182-leading-vert-pat.rs:15:16: 15:17 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-76182-leading-vert-pat.rs:15:18: 15:20 (#0),
- },
- Punct {
- ch: '=',
- spacing: Joint,
- span: $DIR/issue-76182-leading-vert-pat.rs:15:21: 15:22 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/issue-76182-leading-vert-pat.rs:15:22: 15:23 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/issue-76182-leading-vert-pat.rs:15:24: 15:26 (#0),
- },
- ],
- span: $DIR/issue-76182-leading-vert-pat.rs:15:14: 15:28 (#0),
- },
- ],
- span: $DIR/issue-76182-leading-vert-pat.rs:14:11: 16:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs b/src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs
deleted file mode 100644
index 5aefec3ec..000000000
--- a/src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:proc-macro-panic.rs
-// edition:2018
-// needs-unwind proc macro panics to report errors
-
-// Regression test for issue #76270
-// Tests that we don't print an ICE message when a panic
-// occurs in libproc-macro (when `-Z proc-macro-backtrace` is not specified)
-
-extern crate proc_macro_panic;
-
-proc_macro_panic::panic_in_libproc_macro!(); //~ ERROR proc macro panicked
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr b/src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr
deleted file mode 100644
index d69de23a4..000000000
--- a/src/test/ui/proc-macro/issue-76270-panic-in-libproc-macro.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: proc macro panicked
- --> $DIR/issue-76270-panic-in-libproc-macro.rs:11:1
- |
-LL | proc_macro_panic::panic_in_libproc_macro!();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: message: `""` is not a valid identifier
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/issue-78675-captured-inner-attrs.rs b/src/test/ui/proc-macro/issue-78675-captured-inner-attrs.rs
deleted file mode 100644
index 478809324..000000000
--- a/src/test/ui/proc-macro/issue-78675-captured-inner-attrs.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// check-pass
-// edition:2018
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use] extern crate test_macros;
-
-macro_rules! foo {(
- #[fake_attr]
- $item:item
-) => (
- $item
-)}
-
-macro_rules! outer {($item:item) => (
- print_bang! { // Identity proc-macro
- foo! {
- #[fake_attr]
- $item
- }
- }
-)}
-outer! {
- mod bar {
- //! Foo
- }
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-78675-captured-inner-attrs.stdout b/src/test/ui/proc-macro/issue-78675-captured-inner-attrs.stdout
deleted file mode 100644
index 60a400a5d..000000000
--- a/src/test/ui/proc-macro/issue-78675-captured-inner-attrs.stdout
+++ /dev/null
@@ -1,87 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): foo! { #[fake_attr] mod bar {
- #![doc = r" Foo"]
-} }
-PRINT-BANG DEEP-RE-COLLECTED (DISPLAY): foo! { #[fake_attr] mod bar { #! [doc = r" Foo"] } }
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Ident {
- ident: "foo",
- span: $DIR/issue-78675-captured-inner-attrs.rs:20:9: 20:12 (#4),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/issue-78675-captured-inner-attrs.rs:20:12: 20:13 (#4),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-78675-captured-inner-attrs.rs:21:13: 21:14 (#4),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "fake_attr",
- span: $DIR/issue-78675-captured-inner-attrs.rs:21:15: 21:24 (#4),
- },
- ],
- span: $DIR/issue-78675-captured-inner-attrs.rs:21:14: 21:25 (#4),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "mod",
- span: $DIR/issue-78675-captured-inner-attrs.rs:27:5: 27:8 (#0),
- },
- Ident {
- ident: "bar",
- span: $DIR/issue-78675-captured-inner-attrs.rs:27:9: 27:12 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-78675-captured-inner-attrs.rs:28:9: 28:16 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/issue-78675-captured-inner-attrs.rs:28:9: 28:16 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "doc",
- span: $DIR/issue-78675-captured-inner-attrs.rs:28:9: 28:16 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/issue-78675-captured-inner-attrs.rs:28:9: 28:16 (#0),
- },
- Literal {
- kind: StrRaw(0),
- symbol: " Foo",
- suffix: None,
- span: $DIR/issue-78675-captured-inner-attrs.rs:28:9: 28:16 (#0),
- },
- ],
- span: $DIR/issue-78675-captured-inner-attrs.rs:28:9: 28:16 (#0),
- },
- ],
- span: $DIR/issue-78675-captured-inner-attrs.rs:27:13: 29:6 (#0),
- },
- ],
- span: $DIR/issue-78675-captured-inner-attrs.rs:22:13: 22:18 (#4),
- },
- ],
- span: $DIR/issue-78675-captured-inner-attrs.rs:20:14: 23:10 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/issue-79148.rs b/src/test/ui/proc-macro/issue-79148.rs
deleted file mode 100644
index 3f01187a8..000000000
--- a/src/test/ui/proc-macro/issue-79148.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// aux-build:re-export.rs
-// edition:2018
-
-extern crate re_export;
-
-use re_export::cause_ice;
-
-cause_ice!(); //~ ERROR `Variant` is only public within the crate, and cannot be re-exported outside
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-79148.stderr b/src/test/ui/proc-macro/issue-79148.stderr
deleted file mode 100644
index a3b2de01d..000000000
--- a/src/test/ui/proc-macro/issue-79148.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error[E0364]: `Variant` is only public within the crate, and cannot be re-exported outside
- --> $DIR/issue-79148.rs:8:1
- |
-LL | cause_ice!();
- | ^^^^^^^^^^^^
- |
-note: consider marking `Variant` as `pub` in the imported module
- --> $DIR/issue-79148.rs:8:1
- |
-LL | cause_ice!();
- | ^^^^^^^^^^^^
- = note: this error originates in the macro `cause_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0364`.
diff --git a/src/test/ui/proc-macro/issue-79242-slow-retokenize-check.rs b/src/test/ui/proc-macro/issue-79242-slow-retokenize-check.rs
deleted file mode 100644
index b68f19c5d..000000000
--- a/src/test/ui/proc-macro/issue-79242-slow-retokenize-check.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// check-pass
-// aux-build:issue-79242.rs
-
-// Regression test for issue #79242
-// Tests that compilation time doesn't blow up for a proc-macro
-// invocation with deeply nested nonterminals
-
-#![allow(unused)]
-
-extern crate issue_79242;
-
-macro_rules! declare_nats {
- ($prev:ty) => {};
- ($prev:ty, $n:literal$(, $tail:literal)*) => {
-
- issue_79242::dummy! {
- $prev
- }
-
- declare_nats!(Option<$prev>$(, $tail)*);
- };
- (0, $($n:literal),+) => {
- pub struct N0;
- declare_nats!(N0, $($n),+);
- };
-}
-
-declare_nats! {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
-}
-
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-79825.rs b/src/test/ui/proc-macro/issue-79825.rs
deleted file mode 100644
index f628469ce..000000000
--- a/src/test/ui/proc-macro/issue-79825.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// check-pass
-// aux-build:issue-79825.rs
-#![feature(trait_alias)]
-
-extern crate issue_79825;
-
-#[issue_79825::assert_input]
-trait Alias = Sized;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-80760-empty-stmt.rs b/src/test/ui/proc-macro/issue-80760-empty-stmt.rs
deleted file mode 100644
index 86865af0b..000000000
--- a/src/test/ui/proc-macro/issue-80760-empty-stmt.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! empty_stmt {
- ($s:stmt) => {
- print_bang!($s);
-
- // Currently, all attributes are ignored
- // on an empty statement
- #[print_attr]
- #[rustc_dummy(first)]
- #[rustc_dummy(second)]
- $s
- }
-}
-
-fn main() {
- empty_stmt!(;);
-}
diff --git a/src/test/ui/proc-macro/issue-80760-empty-stmt.stdout b/src/test/ui/proc-macro/issue-80760-empty-stmt.stdout
deleted file mode 100644
index 4b7ed8743..000000000
--- a/src/test/ui/proc-macro/issue-80760-empty-stmt.stdout
+++ /dev/null
@@ -1,14 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): ;
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/issue-80760-empty-stmt.rs:25:17: 25:18 (#0),
- },
- ],
- span: $DIR/issue-80760-empty-stmt.rs:13:21: 13:23 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/issue-81007-item-attrs.rs b/src/test/ui/proc-macro/issue-81007-item-attrs.rs
deleted file mode 100644
index ea27d54ee..000000000
--- a/src/test/ui/proc-macro/issue-81007-item-attrs.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// check-pass
-// edition:2018
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use] extern crate test_macros;
-
-macro_rules! capture_item {
- ($item:item) => {
- #[print_attr]
- $item
- }
-}
-
-capture_item! {
- /// A doc comment
- struct Foo {}
-}
-
-capture_item! {
- #[rustc_dummy]
- /// Another comment comment
- struct Bar {}
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-81007-item-attrs.stdout b/src/test/ui/proc-macro/issue-81007-item-attrs.stdout
deleted file mode 100644
index 3c001e995..000000000
--- a/src/test/ui/proc-macro/issue-81007-item-attrs.stdout
+++ /dev/null
@@ -1,99 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): #[doc = r" A doc comment"] struct Foo {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-81007-item-attrs.rs:21:5: 21:22 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "doc",
- span: $DIR/issue-81007-item-attrs.rs:21:5: 21:22 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/issue-81007-item-attrs.rs:21:5: 21:22 (#0),
- },
- Literal {
- kind: StrRaw(0),
- symbol: " A doc comment",
- suffix: None,
- span: $DIR/issue-81007-item-attrs.rs:21:5: 21:22 (#0),
- },
- ],
- span: $DIR/issue-81007-item-attrs.rs:21:5: 21:22 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-81007-item-attrs.rs:22:5: 22:11 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/issue-81007-item-attrs.rs:22:12: 22:15 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-81007-item-attrs.rs:22:16: 22:18 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] #[doc = r" Another comment comment"] struct Bar {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-81007-item-attrs.rs:26:5: 26:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/issue-81007-item-attrs.rs:26:7: 26:18 (#0),
- },
- ],
- span: $DIR/issue-81007-item-attrs.rs:26:6: 26:19 (#0),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/issue-81007-item-attrs.rs:27:5: 27:32 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "doc",
- span: $DIR/issue-81007-item-attrs.rs:27:5: 27:32 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/issue-81007-item-attrs.rs:27:5: 27:32 (#0),
- },
- Literal {
- kind: StrRaw(0),
- symbol: " Another comment comment",
- suffix: None,
- span: $DIR/issue-81007-item-attrs.rs:27:5: 27:32 (#0),
- },
- ],
- span: $DIR/issue-81007-item-attrs.rs:27:5: 27:32 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/issue-81007-item-attrs.rs:28:5: 28:11 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/issue-81007-item-attrs.rs:28:12: 28:15 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/issue-81007-item-attrs.rs:28:16: 28:18 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/issue-81543-item-parse-err.rs b/src/test/ui/proc-macro/issue-81543-item-parse-err.rs
deleted file mode 100644
index 027389556..000000000
--- a/src/test/ui/proc-macro/issue-81543-item-parse-err.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// aux-build:test-macros.rs
-
-// Regression test for issue #81543
-// Tests that we emit a properly spanned error
-// when the output of a proc-macro cannot be parsed
-// as the expected AST node kind
-
-extern crate test_macros;
-
-test_macros::identity! {
- fn 32() {} //~ ERROR expected identifier
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-81543-item-parse-err.stderr b/src/test/ui/proc-macro/issue-81543-item-parse-err.stderr
deleted file mode 100644
index ca5241760..000000000
--- a/src/test/ui/proc-macro/issue-81543-item-parse-err.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected identifier, found `32`
- --> $DIR/issue-81543-item-parse-err.rs:11:8
- |
-LL | fn 32() {}
- | ^^ expected identifier
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/issue-81555.rs b/src/test/ui/proc-macro/issue-81555.rs
deleted file mode 100644
index 693f1f7dc..000000000
--- a/src/test/ui/proc-macro/issue-81555.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-#![feature(stmt_expr_attributes, proc_macro_hygiene)]
-
-extern crate test_macros;
-
-use test_macros::identity_attr;
-
-#[identity_attr]
-fn main() {
- let _x;
- let y = ();
- #[identity_attr]
- _x = y;
-}
diff --git a/src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.rs b/src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.rs
deleted file mode 100644
index 25adc5d25..000000000
--- a/src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Regression test for issue #83469
-// Ensures that we recover from `#[global_alloc]` on an invalid
-// stmt without an ICE
-
-fn outer() {
- #[global_allocator]
- fn inner() {} //~ ERROR allocators must be statics
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr b/src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr
deleted file mode 100644
index ec0e3c4c7..000000000
--- a/src/test/ui/proc-macro/issue-83469-global-alloc-invalid-stmt.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: allocators must be statics
- --> $DIR/issue-83469-global-alloc-invalid-stmt.rs:7:5
- |
-LL | fn inner() {}
- | ^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/issue-83510.rs b/src/test/ui/proc-macro/issue-83510.rs
deleted file mode 100644
index 2b1aec4df..000000000
--- a/src/test/ui/proc-macro/issue-83510.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// aux-build: issue-83510.rs
-
-extern crate issue_83510;
-
-issue_83510::dance_like_you_want_to_ice!();
-//~^ ERROR: cannot find type `Foo` in this scope
-//~| ERROR: expected trait, found struct `Box`
-//~| ERROR: cannot find trait `Baz` in this scope
-//~| ERROR: inherent associated types are unstable
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-83510.stderr b/src/test/ui/proc-macro/issue-83510.stderr
deleted file mode 100644
index e0628a317..000000000
--- a/src/test/ui/proc-macro/issue-83510.stderr
+++ /dev/null
@@ -1,38 +0,0 @@
-error[E0412]: cannot find type `Foo` in this scope
- --> $DIR/issue-83510.rs:5:1
- |
-LL | issue_83510::dance_like_you_want_to_ice!();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
- |
- = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0404]: expected trait, found struct `Box`
- --> $DIR/issue-83510.rs:5:1
- |
-LL | issue_83510::dance_like_you_want_to_ice!();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a trait
- |
- = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0405]: cannot find trait `Baz` in this scope
- --> $DIR/issue-83510.rs:5:1
- |
-LL | issue_83510::dance_like_you_want_to_ice!();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
- |
- = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0658]: inherent associated types are unstable
- --> $DIR/issue-83510.rs:5:1
- |
-LL | issue_83510::dance_like_you_want_to_ice!();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
- = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
- = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0404, E0405, E0412, E0658.
-For more information about an error, try `rustc --explain E0404`.
diff --git a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.fixed b/src/test/ui/proc-macro/issue-86781-bad-inner-doc.fixed
deleted file mode 100644
index 426a5fa72..000000000
--- a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.fixed
+++ /dev/null
@@ -1,12 +0,0 @@
-// aux-build:test-macros.rs
-// run-rustfix
-
-#[macro_use]
-extern crate test_macros;
-
-/// Inner doc comment
-//~^ ERROR expected outer doc comment
-#[derive(Empty)]
-pub struct Foo; //~ NOTE the inner doc comment doesn't annotate this struct
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs b/src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs
deleted file mode 100644
index 31e3f3c85..000000000
--- a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// aux-build:test-macros.rs
-// run-rustfix
-
-#[macro_use]
-extern crate test_macros;
-
-//! Inner doc comment
-//~^ ERROR expected outer doc comment
-#[derive(Empty)]
-pub struct Foo; //~ NOTE the inner doc comment doesn't annotate this struct
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr b/src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr
deleted file mode 100644
index a92f07522..000000000
--- a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0753]: expected outer doc comment
- --> $DIR/issue-86781-bad-inner-doc.rs:7:1
- |
-LL | //! Inner doc comment
- | ^^^^^^^^^^^^^^^^^^^^^
-...
-LL | pub struct Foo;
- | --------------- the inner doc comment doesn't annotate this struct
- |
-help: to annotate the struct, change the doc comment from inner to outer style
- |
-LL | /// Inner doc comment
- | ~
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0753`.
diff --git a/src/test/ui/proc-macro/issue-91800.rs b/src/test/ui/proc-macro/issue-91800.rs
deleted file mode 100644
index 0c1281de4..000000000
--- a/src/test/ui/proc-macro/issue-91800.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// aux-build: issue-91800-macro.rs
-
-#[macro_use]
-extern crate issue_91800_macro;
-
-#[derive(MyTrait)]
-//~^ ERROR macros that expand to items must be delimited with braces or followed by a semicolon
-//~| ERROR proc-macro derive produced unparseable tokens
-#[attribute_macro]
-//~^ ERROR macros that expand to items must be delimited with braces or followed by a semicolon
-struct MyStruct;
-
-fn_macro! {}
-//~^ ERROR macros that expand to items must be delimited with braces or followed by a semicolon
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/issue-91800.stderr b/src/test/ui/proc-macro/issue-91800.stderr
deleted file mode 100644
index 9c356263a..000000000
--- a/src/test/ui/proc-macro/issue-91800.stderr
+++ /dev/null
@@ -1,56 +0,0 @@
-error: macros that expand to items must be delimited with braces or followed by a semicolon
- --> $DIR/issue-91800.rs:6:10
- |
-LL | #[derive(MyTrait)]
- | ^^^^^^^
- |
- = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: proc-macro derive produced unparseable tokens
- --> $DIR/issue-91800.rs:6:10
- |
-LL | #[derive(MyTrait)]
- | ^^^^^^^
-
-error:
- --> $DIR/issue-91800.rs:6:10
- |
-LL | #[derive(MyTrait)]
- | ^^^^^^^
- |
- = note: this error originates in the derive macro `MyTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: macros that expand to items must be delimited with braces or followed by a semicolon
- --> $DIR/issue-91800.rs:9:1
- |
-LL | #[attribute_macro]
- | ^^^^^^^^^^^^^^^^^^
- |
- = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error:
- --> $DIR/issue-91800.rs:9:1
- |
-LL | #[attribute_macro]
- | ^^^^^^^^^^^^^^^^^^
- |
- = note: this error originates in the attribute macro `attribute_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: macros that expand to items must be delimited with braces or followed by a semicolon
- --> $DIR/issue-91800.rs:13:1
- |
-LL | fn_macro! {}
- | ^^^^^^^^^^^^
- |
- = note: this error originates in the macro `fn_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error:
- --> $DIR/issue-91800.rs:13:1
- |
-LL | fn_macro! {}
- | ^^^^^^^^^^^^
- |
- = note: this error originates in the macro `fn_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 7 previous errors
-
diff --git a/src/test/ui/proc-macro/item-error.rs b/src/test/ui/proc-macro/item-error.rs
deleted file mode 100644
index 64c203e54..000000000
--- a/src/test/ui/proc-macro/item-error.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// aux-build:derive-b.rs
-
-#![allow(warnings)]
-
-#[macro_use]
-extern crate derive_b;
-
-#[derive(B)]
-struct A {
- a: &u64
-//~^ ERROR: missing lifetime specifier
-}
-
-fn main() {
-}
diff --git a/src/test/ui/proc-macro/item-error.stderr b/src/test/ui/proc-macro/item-error.stderr
deleted file mode 100644
index b544be6e9..000000000
--- a/src/test/ui/proc-macro/item-error.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0106]: missing lifetime specifier
- --> $DIR/item-error.rs:10:8
- |
-LL | a: &u64
- | ^ expected named lifetime parameter
- |
-help: consider introducing a named lifetime parameter
- |
-LL ~ struct A<'a> {
-LL ~ a: &'a u64
- |
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/ui/proc-macro/keep-expr-tokens.rs b/src/test/ui/proc-macro/keep-expr-tokens.rs
deleted file mode 100644
index 0bf889a85..000000000
--- a/src/test/ui/proc-macro/keep-expr-tokens.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-
-#![feature(stmt_expr_attributes)]
-#![feature(proc_macro_hygiene)]
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate test_macros;
-
-use test_macros::recollect_attr;
-
-fn main() {
- #[test_macros::recollect_attr]
- for item in missing_fn() {} //~ ERROR cannot find
-
- (#[recollect_attr] #[recollect_attr] ((#[recollect_attr] bad))); //~ ERROR cannot
-
- #[test_macros::print_attr]
- #[rustc_dummy]
- { 1 +1; } // Don't change the weird spacing of the '+'
-}
diff --git a/src/test/ui/proc-macro/keep-expr-tokens.stderr b/src/test/ui/proc-macro/keep-expr-tokens.stderr
deleted file mode 100644
index 1a1f83cc1..000000000
--- a/src/test/ui/proc-macro/keep-expr-tokens.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0425]: cannot find value `bad` in this scope
- --> $DIR/keep-expr-tokens.rs:19:62
- |
-LL | (#[recollect_attr] #[recollect_attr] ((#[recollect_attr] bad)));
- | ^^^ not found in this scope
-
-error[E0425]: cannot find function `missing_fn` in this scope
- --> $DIR/keep-expr-tokens.rs:17:17
- |
-LL | for item in missing_fn() {}
- | ^^^^^^^^^^ not found in this scope
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/proc-macro/keep-expr-tokens.stdout b/src/test/ui/proc-macro/keep-expr-tokens.stdout
deleted file mode 100644
index fcd72a0e0..000000000
--- a/src/test/ui/proc-macro/keep-expr-tokens.stdout
+++ /dev/null
@@ -1,46 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): #[rustc_dummy] { 1 + 1 ; }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/keep-expr-tokens.rs:22:5: 22:6 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/keep-expr-tokens.rs:22:7: 22:18 (#0),
- },
- ],
- span: $DIR/keep-expr-tokens.rs:22:6: 22:19 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/keep-expr-tokens.rs:23:7: 23:8 (#0),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/keep-expr-tokens.rs:23:9: 23:10 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/keep-expr-tokens.rs:23:10: 23:11 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/keep-expr-tokens.rs:23:11: 23:12 (#0),
- },
- ],
- span: $DIR/keep-expr-tokens.rs:23:5: 23:14 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/lifetimes-rpass.rs b/src/test/ui/proc-macro/lifetimes-rpass.rs
deleted file mode 100644
index a1d33ddca..000000000
--- a/src/test/ui/proc-macro/lifetimes-rpass.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// run-pass
-
-#![allow(unused_variables)]
-// aux-build:lifetimes-rpass.rs
-
-extern crate lifetimes_rpass as lifetimes;
-use lifetimes::*;
-
-lifetimes_bang! {
- fn bang<'a>() -> &'a u8 { &0 }
-}
-
-#[lifetimes_attr]
-fn attr<'a>() -> &'a u8 { &1 }
-
-#[derive(Lifetimes)]
-pub struct Lifetimes<'a> {
- pub field: &'a u8,
-}
-
-fn main() {
- assert_eq!(bang::<'static>(), &0);
- assert_eq!(attr::<'static>(), &1);
- let l1 = Lifetimes { field: &0 };
- let l2 = m::Lifetimes { field: &1 };
-}
diff --git a/src/test/ui/proc-macro/lifetimes.rs b/src/test/ui/proc-macro/lifetimes.rs
deleted file mode 100644
index 560569671..000000000
--- a/src/test/ui/proc-macro/lifetimes.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:lifetimes.rs
-
-extern crate lifetimes;
-
-use lifetimes::*;
-
-type A = single_quote_alone!(); //~ ERROR expected type, found `'`
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/lifetimes.stderr b/src/test/ui/proc-macro/lifetimes.stderr
deleted file mode 100644
index 0c99809ed..000000000
--- a/src/test/ui/proc-macro/lifetimes.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error: expected type, found `'`
- --> $DIR/lifetimes.rs:7:10
- |
-LL | type A = single_quote_alone!();
- | ^^^^^^^^^^^^^^^^^^^^^
- | |
- | expected type
- | this macro call doesn't expand to a type
- |
- = note: this error originates in the macro `single_quote_alone` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/lints_in_proc_macros.rs b/src/test/ui/proc-macro/lints_in_proc_macros.rs
deleted file mode 100644
index 377a1f25b..000000000
--- a/src/test/ui/proc-macro/lints_in_proc_macros.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// aux-build:bang_proc_macro2.rs
-
-extern crate bang_proc_macro2;
-
-use bang_proc_macro2::bang_proc_macro2;
-
-fn main() {
- let foobar = 42;
- bang_proc_macro2!();
- //~^ ERROR cannot find value `foobar2` in this scope
- //~| HELP a local variable with a similar name exists
- //~| SUGGESTION foobar
- println!("{}", x);
-}
diff --git a/src/test/ui/proc-macro/lints_in_proc_macros.stderr b/src/test/ui/proc-macro/lints_in_proc_macros.stderr
deleted file mode 100644
index 4dd8be7d9..000000000
--- a/src/test/ui/proc-macro/lints_in_proc_macros.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0425]: cannot find value `foobar2` in this scope
- --> $DIR/lints_in_proc_macros.rs:9:5
- |
-LL | bang_proc_macro2!();
- | ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar`
- |
- = note: this error originates in the macro `bang_proc_macro2` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/proc-macro/load-panic-backtrace.rs b/src/test/ui/proc-macro/load-panic-backtrace.rs
deleted file mode 100644
index bcdcb704a..000000000
--- a/src/test/ui/proc-macro/load-panic-backtrace.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// aux-build:test-macros.rs
-// compile-flags: -Z proc-macro-backtrace
-// rustc-env:RUST_BACKTRACE=0
-// normalize-stderr-test "thread '.*' panicked " -> ""
-// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
-// needs-unwind proc macro panics to report errors
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive(Panic)]
-//~^ ERROR: proc-macro derive panicked
-struct Foo;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/load-panic-backtrace.stderr b/src/test/ui/proc-macro/load-panic-backtrace.stderr
deleted file mode 100644
index 45d4fd1c9..000000000
--- a/src/test/ui/proc-macro/load-panic-backtrace.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-at 'panic-derive', $DIR/auxiliary/test-macros.rs:43:5
-error: proc-macro derive panicked
- --> $DIR/load-panic-backtrace.rs:11:10
- |
-LL | #[derive(Panic)]
- | ^^^^^
- |
- = help: message: panic-derive
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/load-panic.rs b/src/test/ui/proc-macro/load-panic.rs
deleted file mode 100644
index 6ce88c400..000000000
--- a/src/test/ui/proc-macro/load-panic.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// aux-build:test-macros.rs
-// needs-unwind proc macro panics to report errors
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive(Panic)]
-//~^ ERROR: proc-macro derive panicked
-struct Foo;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/load-panic.stderr b/src/test/ui/proc-macro/load-panic.stderr
deleted file mode 100644
index f0d62f690..000000000
--- a/src/test/ui/proc-macro/load-panic.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: proc-macro derive panicked
- --> $DIR/load-panic.rs:7:10
- |
-LL | #[derive(Panic)]
- | ^^^^^
- |
- = help: message: panic-derive
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/load-two.rs b/src/test/ui/proc-macro/load-two.rs
deleted file mode 100644
index 5ce0e6545..000000000
--- a/src/test/ui/proc-macro/load-two.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// run-pass
-
-#![allow(path_statements)]
-#![allow(dead_code)]
-// aux-build:derive-atob.rs
-// aux-build:derive-ctod.rs
-
-#[macro_use]
-extern crate derive_atob;
-#[macro_use]
-extern crate derive_ctod;
-
-#[derive(Copy, Clone)]
-#[derive(AToB)]
-struct A;
-
-#[derive(CToD)]
-struct C;
-
-fn main() {
- B;
- D;
-}
diff --git a/src/test/ui/proc-macro/macro-brackets.rs b/src/test/ui/proc-macro/macro-brackets.rs
deleted file mode 100644
index aa0046f45..000000000
--- a/src/test/ui/proc-macro/macro-brackets.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! id {
- ($($t:tt)*) => ($($t)*)
-}
-
-#[identity_attr]
-id![static X: u32 = 'a';]; //~ ERROR: mismatched types
-
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/macro-brackets.stderr b/src/test/ui/proc-macro/macro-brackets.stderr
deleted file mode 100644
index d35163752..000000000
--- a/src/test/ui/proc-macro/macro-brackets.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/macro-brackets.rs:11:21
- |
-LL | id![static X: u32 = 'a';];
- | ^^^ expected `u32`, found `char`
- |
-help: you can cast a `char` to a `u32`, since a `char` always occupies 4 bytes
- |
-LL | id![static X: u32 = 'a' as u32;];
- | ++++++
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/macro-crate-multi-decorator.rs b/src/test/ui/proc-macro/macro-crate-multi-decorator.rs
deleted file mode 100644
index ec57dec14..000000000
--- a/src/test/ui/proc-macro/macro-crate-multi-decorator.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// The duplicate macro will create a copy of the item with the given identifier.
-
-// check-pass
-// aux-build:duplicate.rs
-
-#[macro_use]
-extern crate duplicate;
-
-#[duplicate(MyCopy)]
-struct MyStruct {
- number: i32,
-}
-
-trait TestTrait {
- #[duplicate(TestType2)]
- type TestType;
-
- #[duplicate(required_fn2)]
- fn required_fn(&self);
-
- #[duplicate(provided_fn2)]
- fn provided_fn(&self) {}
-}
-
-impl TestTrait for MyStruct {
- #[duplicate(TestType2)]
- type TestType = f64;
-
- #[duplicate(required_fn2)]
- fn required_fn(&self) {}
-}
-
-fn main() {
- let s = MyStruct { number: 42 };
- s.required_fn();
- s.required_fn2();
- s.provided_fn();
- s.provided_fn2();
-
- let s = MyCopy { number: 42 };
-}
diff --git a/src/test/ui/proc-macro/macro-namespace-reserved-2.rs b/src/test/ui/proc-macro/macro-namespace-reserved-2.rs
deleted file mode 100644
index 470b22b48..000000000
--- a/src/test/ui/proc-macro/macro-namespace-reserved-2.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn my_macro(input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_attribute]
-pub fn my_macro_attr(input: TokenStream, _: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_derive(MyTrait)]
-pub fn my_macro_derive(input: TokenStream) -> TokenStream {
- input
-}
-
-fn check_bang1() {
- my_macro!(); //~ ERROR can't use a procedural macro from the same crate that defines it
-}
-fn check_bang2() {
- my_macro_attr!(); //~ ERROR cannot find macro `my_macro_attr` in this scope
- crate::my_macro_attr!(); //~ ERROR can't use a procedural macro from the same crate that defines
- //~| ERROR expected macro, found attribute macro `crate::my_macro_attr`
-}
-fn check_bang3() {
- MyTrait!(); //~ ERROR cannot find macro `MyTrait` in this scope
- crate::MyTrait!(); //~ ERROR can't use a procedural macro from the same crate that defines it
- //~| ERROR expected macro, found derive macro `crate::MyTrait`
-}
-
-#[my_macro] //~ ERROR cannot find attribute `my_macro` in this scope
-#[crate::my_macro] //~ ERROR can't use a procedural macro from the same crate that defines it
- //~| ERROR expected attribute, found macro `crate::my_macro`
-fn check_attr1() {}
-#[my_macro_attr] //~ ERROR can't use a procedural macro from the same crate that defines it
-fn check_attr2() {}
-#[MyTrait] //~ ERROR can't use a procedural macro from the same crate that defines it
- //~| ERROR expected attribute, found derive macro `MyTrait`
-fn check_attr3() {}
-
-#[derive(my_macro)] //~ ERROR cannot find derive macro `my_macro` in this scope
- //~| ERROR cannot find derive macro `my_macro` in this scope
-#[derive(crate::my_macro)] //~ ERROR can't use a procedural macro from the same crate that defines
- //~| ERROR expected derive macro, found macro `crate::my_macro`
-struct CheckDerive1;
-#[derive(my_macro_attr)] //~ ERROR can't use a procedural macro from the same crate that defines it
- //~| ERROR expected derive macro, found attribute macro `my_macro_attr`
-struct CheckDerive2;
-#[derive(MyTrait)] //~ ERROR can't use a procedural macro from the same crate that defines it
-struct CheckDerive3;
diff --git a/src/test/ui/proc-macro/macro-namespace-reserved-2.stderr b/src/test/ui/proc-macro/macro-namespace-reserved-2.stderr
deleted file mode 100644
index 633a6c6a0..000000000
--- a/src/test/ui/proc-macro/macro-namespace-reserved-2.stderr
+++ /dev/null
@@ -1,132 +0,0 @@
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:25:5
- |
-LL | my_macro!();
- | ^^^^^^^^
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:29:5
- |
-LL | crate::my_macro_attr!();
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: expected macro, found attribute macro `crate::my_macro_attr`
- --> $DIR/macro-namespace-reserved-2.rs:29:5
- |
-LL | crate::my_macro_attr!();
- | ^^^^^^^^^^^^^^^^^^^^ not a macro
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:34:5
- |
-LL | crate::MyTrait!();
- | ^^^^^^^^^^^^^^
-
-error: expected macro, found derive macro `crate::MyTrait`
- --> $DIR/macro-namespace-reserved-2.rs:34:5
- |
-LL | crate::MyTrait!();
- | ^^^^^^^^^^^^^^ not a macro
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:42:3
- |
-LL | #[my_macro_attr]
- | ^^^^^^^^^^^^^
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:44:3
- |
-LL | #[MyTrait]
- | ^^^^^^^
-
-error: expected attribute, found derive macro `MyTrait`
- --> $DIR/macro-namespace-reserved-2.rs:44:3
- |
-LL | #[MyTrait]
- | ^^^^^^^ not an attribute
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:53:10
- |
-LL | #[derive(my_macro_attr)]
- | ^^^^^^^^^^^^^
-
-error: expected derive macro, found attribute macro `my_macro_attr`
- --> $DIR/macro-namespace-reserved-2.rs:53:10
- |
-LL | #[derive(my_macro_attr)]
- | ^^^^^^^^^^^^^ not a derive macro
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:56:10
- |
-LL | #[derive(MyTrait)]
- | ^^^^^^^
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:39:3
- |
-LL | #[crate::my_macro]
- | ^^^^^^^^^^^^^^^
-
-error: expected attribute, found macro `crate::my_macro`
- --> $DIR/macro-namespace-reserved-2.rs:39:3
- |
-LL | #[crate::my_macro]
- | ^^^^^^^^^^^^^^^ not an attribute
-
-error: can't use a procedural macro from the same crate that defines it
- --> $DIR/macro-namespace-reserved-2.rs:50:10
- |
-LL | #[derive(crate::my_macro)]
- | ^^^^^^^^^^^^^^^
-
-error: expected derive macro, found macro `crate::my_macro`
- --> $DIR/macro-namespace-reserved-2.rs:50:10
- |
-LL | #[derive(crate::my_macro)]
- | ^^^^^^^^^^^^^^^ not a derive macro
-
-error: cannot find macro `my_macro_attr` in this scope
- --> $DIR/macro-namespace-reserved-2.rs:28:5
- |
-LL | my_macro_attr!();
- | ^^^^^^^^^^^^^
- |
- = note: `my_macro_attr` is in scope, but it is an attribute: `#[my_macro_attr]`
-
-error: cannot find macro `MyTrait` in this scope
- --> $DIR/macro-namespace-reserved-2.rs:33:5
- |
-LL | MyTrait!();
- | ^^^^^^^
- |
- = note: `MyTrait` is in scope, but it is a derive macro: `#[derive(MyTrait)]`
-
-error: cannot find attribute `my_macro` in this scope
- --> $DIR/macro-namespace-reserved-2.rs:38:3
- |
-LL | #[my_macro]
- | ^^^^^^^^
- |
- = note: `my_macro` is in scope, but it is a function-like macro
-
-error: cannot find derive macro `my_macro` in this scope
- --> $DIR/macro-namespace-reserved-2.rs:48:10
- |
-LL | #[derive(my_macro)]
- | ^^^^^^^^
- |
- = note: `my_macro` is in scope, but it is a function-like macro
-
-error: cannot find derive macro `my_macro` in this scope
- --> $DIR/macro-namespace-reserved-2.rs:48:10
- |
-LL | #[derive(my_macro)]
- | ^^^^^^^^
- |
- = note: `my_macro` is in scope, but it is a function-like macro
-
-error: aborting due to 20 previous errors
-
diff --git a/src/test/ui/proc-macro/macro-namespace-reserved.rs b/src/test/ui/proc-macro/macro-namespace-reserved.rs
deleted file mode 100644
index 60d379e41..000000000
--- a/src/test/ui/proc-macro/macro-namespace-reserved.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![feature(decl_macro)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub fn my_macro(input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_attribute]
-pub fn my_macro_attr(input: TokenStream, _: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro_derive(MyTrait)]
-pub fn my_macro_derive(input: TokenStream) -> TokenStream {
- input
-}
-
-macro my_macro() {} //~ ERROR the name `my_macro` is defined multiple times
-macro my_macro_attr() {} //~ ERROR the name `my_macro_attr` is defined multiple times
-macro MyTrait() {} //~ ERROR the name `MyTrait` is defined multiple times
-
-#[proc_macro_derive(SameName)]
-pub fn foo(input: TokenStream) -> TokenStream {
- input
-}
-
-#[proc_macro]
-pub fn SameName(input: TokenStream) -> TokenStream {
-//~^ ERROR the name `SameName` is defined multiple times
- input
-}
diff --git a/src/test/ui/proc-macro/macro-namespace-reserved.stderr b/src/test/ui/proc-macro/macro-namespace-reserved.stderr
deleted file mode 100644
index f5d589c3a..000000000
--- a/src/test/ui/proc-macro/macro-namespace-reserved.stderr
+++ /dev/null
@@ -1,47 +0,0 @@
-error[E0428]: the name `my_macro` is defined multiple times
- --> $DIR/macro-namespace-reserved.rs:25:1
- |
-LL | pub fn my_macro(input: TokenStream) -> TokenStream {
- | -------------------------------------------------- previous definition of the macro `my_macro` here
-...
-LL | macro my_macro() {}
- | ^^^^^^^^^^^^^^^^ `my_macro` redefined here
- |
- = note: `my_macro` must be defined only once in the macro namespace of this module
-
-error[E0428]: the name `my_macro_attr` is defined multiple times
- --> $DIR/macro-namespace-reserved.rs:26:1
- |
-LL | pub fn my_macro_attr(input: TokenStream, _: TokenStream) -> TokenStream {
- | ----------------------------------------------------------------------- previous definition of the macro `my_macro_attr` here
-...
-LL | macro my_macro_attr() {}
- | ^^^^^^^^^^^^^^^^^^^^^ `my_macro_attr` redefined here
- |
- = note: `my_macro_attr` must be defined only once in the macro namespace of this module
-
-error[E0428]: the name `MyTrait` is defined multiple times
- --> $DIR/macro-namespace-reserved.rs:27:1
- |
-LL | #[proc_macro_derive(MyTrait)]
- | ------- previous definition of the macro `MyTrait` here
-...
-LL | macro MyTrait() {}
- | ^^^^^^^^^^^^^^^ `MyTrait` redefined here
- |
- = note: `MyTrait` must be defined only once in the macro namespace of this module
-
-error[E0428]: the name `SameName` is defined multiple times
- --> $DIR/macro-namespace-reserved.rs:35:1
- |
-LL | #[proc_macro_derive(SameName)]
- | -------- previous definition of the macro `SameName` here
-...
-LL | pub fn SameName(input: TokenStream) -> TokenStream {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SameName` redefined here
- |
- = note: `SameName` must be defined only once in the macro namespace of this module
-
-error: aborting due to 4 previous errors
-
-For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/ui/proc-macro/macro-quote-cond.rs b/src/test/ui/proc-macro/macro-quote-cond.rs
deleted file mode 100644
index 48307f4d9..000000000
--- a/src/test/ui/proc-macro/macro-quote-cond.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// run-pass
-// aux-build:cond_plugin.rs
-
-#![allow(unused_parens)]
-
-extern crate cond_plugin;
-
-use cond_plugin::cond;
-
-fn fact(n : i64) -> i64 {
- if n == 0 {
- 1
- } else {
- n * fact(n - 1)
- }
-}
-
-fn fact_cond(n : i64) -> i64 {
- cond!(
- ((n == 0) 1)
- (else (n * fact_cond(n-1)))
- )
-}
-
-fn fib(n : i64) -> i64 {
- if n == 0 || n == 1 {
- 1
- } else {
- fib(n-1) + fib(n-2)
- }
-}
-
-fn fib_cond(n : i64) -> i64 {
- cond!(
- ((n == 0) 1)
- ((n == 1) 1)
- (else (fib_cond(n-1) + fib_cond(n-2)))
- )
-}
-
-fn main() {
- assert_eq!(fact(3), fact_cond(3));
- assert_eq!(fact(5), fact_cond(5));
- assert_eq!(fib(5), fib_cond(5));
- assert_eq!(fib(8), fib_cond(8));
-}
diff --git a/src/test/ui/proc-macro/macro-rules-derive-cfg.rs b/src/test/ui/proc-macro/macro-rules-derive-cfg.rs
deleted file mode 100644
index a221b9578..000000000
--- a/src/test/ui/proc-macro/macro-rules-derive-cfg.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug --error-format human
-// aux-build:test-macros.rs
-
-#![feature(rustc_attrs)]
-#![feature(stmt_expr_attributes)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! produce_it {
- ($expr:expr) => {
- #[derive(Print)]
- struct Foo {
- val: [bool; {
- let a = #[cfg_attr(not(FALSE), rustc_dummy(first))] $expr;
- 0
- }]
- }
- }
-}
-
-produce_it!(#[cfg_attr(not(FALSE), rustc_dummy(second))] {
- #![cfg_attr(not(FALSE), allow(unused))]
- 30
-});
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/macro-rules-derive-cfg.stdout b/src/test/ui/proc-macro/macro-rules-derive-cfg.stdout
deleted file mode 100644
index 74641058e..000000000
--- a/src/test/ui/proc-macro/macro-rules-derive-cfg.stdout
+++ /dev/null
@@ -1,171 +0,0 @@
-PRINT-DERIVE INPUT (DISPLAY): struct Foo
-{
- val :
- [bool ;
- {
- let a = #[rustc_dummy(first)] #[rustc_dummy(second)]
- { #! [allow(unused)] 30 } ; 0
- }]
-}
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/macro-rules-derive-cfg.rs:17:9: 17:15 (#4),
- },
- Ident {
- ident: "Foo",
- span: $DIR/macro-rules-derive-cfg.rs:17:16: 17:19 (#4),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "val",
- span: $DIR/macro-rules-derive-cfg.rs:18:13: 18:16 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:18:16: 18:17 (#4),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "bool",
- span: $DIR/macro-rules-derive-cfg.rs:18:19: 18:23 (#4),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:18:23: 18:24 (#4),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "let",
- span: $DIR/macro-rules-derive-cfg.rs:19:17: 19:20 (#4),
- },
- Ident {
- ident: "a",
- span: $DIR/macro-rules-derive-cfg.rs:19:21: 19:22 (#4),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:19:23: 19:24 (#4),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:19:25: 19:26 (#4),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/macro-rules-derive-cfg.rs:19:48: 19:59 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "first",
- span: $DIR/macro-rules-derive-cfg.rs:19:60: 19:65 (#4),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:19:59: 19:66 (#4),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:19:25: 19:26 (#4),
- },
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:26:13: 26:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/macro-rules-derive-cfg.rs:26:36: 26:47 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "second",
- span: $DIR/macro-rules-derive-cfg.rs:26:48: 26:54 (#0),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:26:47: 26:55 (#0),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:26:13: 26:14 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:27:5: 27:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:27:6: 27:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "allow",
- span: $DIR/macro-rules-derive-cfg.rs:27:29: 27:34 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "unused",
- span: $DIR/macro-rules-derive-cfg.rs:27:35: 27:41 (#0),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:27:34: 27:42 (#0),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:27:5: 27:6 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "30",
- suffix: None,
- span: $DIR/macro-rules-derive-cfg.rs:28:5: 28:7 (#0),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:26:58: 29:2 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/macro-rules-derive-cfg.rs:19:74: 19:75 (#4),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/macro-rules-derive-cfg.rs:20:17: 20:18 (#4),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:18:25: 21:14 (#4),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:18:18: 21:15 (#4),
- },
- ],
- span: $DIR/macro-rules-derive-cfg.rs:17:20: 22:10 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/macro-rules-derive.rs b/src/test/ui/proc-macro/macro-rules-derive.rs
deleted file mode 100644
index e0c40bbc7..000000000
--- a/src/test/ui/proc-macro/macro-rules-derive.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// aux-build:first-second.rs
-
-extern crate first_second;
-use first_second::*;
-
-macro_rules! produce_it {
- ($name:ident) => {
- #[first]
- struct $name {
- field: MissingType //~ ERROR cannot find type
- }
- }
-}
-
-produce_it!(MyName);
-
-fn main() {
- println!("Hello, world!");
-}
diff --git a/src/test/ui/proc-macro/macro-rules-derive.stderr b/src/test/ui/proc-macro/macro-rules-derive.stderr
deleted file mode 100644
index 517cbabd5..000000000
--- a/src/test/ui/proc-macro/macro-rules-derive.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0412]: cannot find type `MissingType` in this scope
- --> $DIR/macro-rules-derive.rs:10:20
- |
-LL | field: MissingType
- | ^^^^^^^^^^^ not found in this scope
-...
-LL | produce_it!(MyName);
- | ------------------- in this macro invocation
- |
- = note: this error originates in the macro `produce_it` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/proc-macro/macro-use-attr.rs b/src/test/ui/proc-macro/macro-use-attr.rs
deleted file mode 100644
index b101c09ed..000000000
--- a/src/test/ui/proc-macro/macro-use-attr.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[identity_attr]
-struct Foo;
-
-fn main() {
- let _ = Foo;
-}
diff --git a/src/test/ui/proc-macro/macro-use-bang.rs b/src/test/ui/proc-macro/macro-use-bang.rs
deleted file mode 100644
index 4a0bf0b2f..000000000
--- a/src/test/ui/proc-macro/macro-use-bang.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// build-pass (FIXME(62277): could be check-pass?)
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-fn main() {
- identity!(println!("Hello, world!"));
-}
diff --git a/src/test/ui/proc-macro/macros-in-extern-derive.rs b/src/test/ui/proc-macro/macros-in-extern-derive.rs
deleted file mode 100644
index c8b26b005..000000000
--- a/src/test/ui/proc-macro/macros-in-extern-derive.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-extern "C" {
- #[derive(Copy)] //~ ERROR `derive` may only be applied to `struct`s, `enum`s and `union`s
- fn f();
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/macros-in-extern-derive.stderr b/src/test/ui/proc-macro/macros-in-extern-derive.stderr
deleted file mode 100644
index efd9ff225..000000000
--- a/src/test/ui/proc-macro/macros-in-extern-derive.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s
- --> $DIR/macros-in-extern-derive.rs:2:5
- |
-LL | #[derive(Copy)]
- | ^^^^^^^^^^^^^^^ not applicable here
-LL | fn f();
- | ------- not a `struct`, `enum` or `union`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0774`.
diff --git a/src/test/ui/proc-macro/macros-in-extern.rs b/src/test/ui/proc-macro/macros-in-extern.rs
deleted file mode 100644
index 57e2066d8..000000000
--- a/src/test/ui/proc-macro/macros-in-extern.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// run-pass
-// aux-build:test-macros.rs
-// ignore-wasm32
-
-#[macro_use]
-extern crate test_macros;
-
-fn main() {
- assert_eq!(unsafe { rust_get_test_int() }, 1);
- assert_eq!(unsafe { rust_dbg_extern_identity_u32(0xDEADBEEF) }, 0xDEADBEEF);
-}
-
-#[link(name = "rust_test_helpers", kind = "static")]
-extern "C" {
- #[empty_attr]
- fn some_definitely_unknown_symbol_which_should_be_removed();
-
- #[identity_attr]
- fn rust_get_test_int() -> isize;
-
- identity!(
- fn rust_dbg_extern_identity_u32(arg: u32) -> u32;
- );
-}
diff --git a/src/test/ui/proc-macro/macros-in-type.rs b/src/test/ui/proc-macro/macros-in-type.rs
deleted file mode 100644
index 19ed58ece..000000000
--- a/src/test/ui/proc-macro/macros-in-type.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-const C: identity!(u8) = 10;
-
-fn main() {
- let c: u8 = C;
-}
diff --git a/src/test/ui/proc-macro/meta-delim.rs b/src/test/ui/proc-macro/meta-delim.rs
deleted file mode 100644
index 964291bc6..000000000
--- a/src/test/ui/proc-macro/meta-delim.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// aux-build:meta-delim.rs
-// edition:2018
-// run-pass
-
-// Tests that we can properly deserialize a macro with strange delimiters
-// See https://github.com/rust-lang/rust/pull/73569#issuecomment-650860457
-
-extern crate meta_delim;
-
-fn main() {
- assert_eq!("a bunch of idents", meta_delim::meta_delim!(a bunch of idents));
-}
diff --git a/src/test/ui/proc-macro/meta-macro-hygiene.rs b/src/test/ui/proc-macro/meta-macro-hygiene.rs
deleted file mode 100644
index 70b8d8da1..000000000
--- a/src/test/ui/proc-macro/meta-macro-hygiene.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// aux-build:make-macro.rs
-// aux-build:meta-macro.rs
-// edition:2018
-// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no
-// check-pass
-// normalize-stdout-test "\d+#" -> "0#"
-// normalize-stdout-test "expn\d{3,}" -> "expnNNN"
-//
-// We don't care about symbol ids, so we set them all to 0
-// in the stdout
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate meta_macro;
-
-macro_rules! produce_it {
- () => {
- // `print_def_site!` will respan the `$crate` identifier
- // with `Span::def_site()`. This should cause it to resolve
- // relative to `meta_macro`, *not* `make_macro` (despite
- // the fact that `print_def_site` is produced by a
- // `macro_rules!` macro in `make_macro`).
- meta_macro::print_def_site!($crate::dummy!());
- }
-}
-
-fn main() {
- produce_it!();
-}
diff --git a/src/test/ui/proc-macro/meta-macro-hygiene.stdout b/src/test/ui/proc-macro/meta-macro-hygiene.stdout
deleted file mode 100644
index 6b7b0c819..000000000
--- a/src/test/ui/proc-macro/meta-macro-hygiene.stdout
+++ /dev/null
@@ -1,69 +0,0 @@
-Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5)
-Input: TokenStream [Ident { ident: "$crate", span: $DIR/meta-macro-hygiene.rs:24:37: 24:43 (#4) }, Punct { ch: ':', spacing: Joint, span: $DIR/meta-macro-hygiene.rs:24:43: 24:44 (#4) }, Punct { ch: ':', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:44: 24:45 (#4) }, Ident { ident: "dummy", span: $DIR/meta-macro-hygiene.rs:24:45: 24:50 (#4) }, Punct { ch: '!', spacing: Alone, span: $DIR/meta-macro-hygiene.rs:24:50: 24:51 (#4) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/meta-macro-hygiene.rs:24:51: 24:53 (#4) }]
-Respanned: TokenStream [Ident { ident: "$crate", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: ':', spacing: Joint, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: ':', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Ident { ident: "dummy", span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Punct { ch: '!', spacing: Alone, span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#5) }]
-#![feature /* 0#0 */(prelude_import)]
-// aux-build:make-macro.rs
-// aux-build:meta-macro.rs
-// edition:2018
-// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene -Z trim-diagnostic-paths=no
-// check-pass
-// normalize-stdout-test "\d+#" -> "0#"
-// normalize-stdout-test "expn\d{3,}" -> "expnNNN"
-//
-// We don't care about symbol ids, so we set them all to 0
-// in the stdout
-
-#![no_std /* 0#0 */]
-#[prelude_import /* 0#1 */]
-use core /* 0#1 */::prelude /* 0#1 */::rust_2018 /* 0#1 */::*;
-#[macro_use /* 0#1 */]
-extern crate core /* 0#1 */;
-#[macro_use /* 0#1 */]
-extern crate compiler_builtins /* 0#1 */;
-// Don't load unnecessary hygiene information from std
-extern crate std /* 0#0 */;
-
-extern crate meta_macro /* 0#0 */;
-
-macro_rules! produce_it
- /*
- 0#0
- */ {
- () =>
- {
- meta_macro :: print_def_site! ($crate :: dummy! ()) ;
- // `print_def_site!` will respan the `$crate` identifier
- // with `Span::def_site()`. This should cause it to resolve
- // relative to `meta_macro`, *not* `make_macro` (despite
- // the fact that `print_def_site` is produced by a
- // `macro_rules!` macro in `make_macro`).
- }
-}
-
-fn main /* 0#0 */() { ; }
-
-/*
-Expansions:
-crate0::{{expn0}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Root
-crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
-crate0::{{expn2}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "produce_it")
-crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #4, def_site_ctxt: #0, kind: Macro(Bang, "meta_macro::print_def_site")
-crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #5, def_site_ctxt: #0, kind: Macro(Bang, "$crate::dummy")
-crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
-crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
-crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "include")
-crate2::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
-
-SyntaxContexts:
-#0: parent: #0, outer_mark: (crate0::{{expn0}}, Opaque)
-#1: parent: #0, outer_mark: (crate0::{{expn1}}, Opaque)
-#2: parent: #0, outer_mark: (crate0::{{expn1}}, Transparent)
-#3: parent: #0, outer_mark: (crate2::{{expn1}}, Opaque)
-#4: parent: #0, outer_mark: (crate0::{{expn2}}, SemiTransparent)
-#5: parent: #0, outer_mark: (crate0::{{expn3}}, Opaque)
-#6: parent: #4, outer_mark: (crate0::{{expn3}}, Transparent)
-#7: parent: #0, outer_mark: (crate0::{{expn3}}, SemiTransparent)
-#8: parent: #0, outer_mark: (crate0::{{expn4}}, Opaque)
-#9: parent: #5, outer_mark: (crate0::{{expn4}}, Transparent)
-#10: parent: #5, outer_mark: (crate0::{{expn4}}, SemiTransparent)
-*/
diff --git a/src/test/ui/proc-macro/meta-macro.rs b/src/test/ui/proc-macro/meta-macro.rs
deleted file mode 100644
index dbac90382..000000000
--- a/src/test/ui/proc-macro/meta-macro.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// aux-build:make-macro.rs
-// aux-build:meta-macro.rs
-// edition:2018
-// compile-flags: -Z span-debug
-// run-pass
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate meta_macro;
-
-fn main() {
- meta_macro::print_def_site!();
-}
diff --git a/src/test/ui/proc-macro/meta-macro.stdout b/src/test/ui/proc-macro/meta-macro.stdout
deleted file mode 100644
index 662682d40..000000000
--- a/src/test/ui/proc-macro/meta-macro.stdout
+++ /dev/null
@@ -1,3 +0,0 @@
-Def site: $DIR/auxiliary/make-macro.rs:7:9: 7:56 (#4)
-Input: TokenStream []
-Respanned: TokenStream []
diff --git a/src/test/ui/proc-macro/mixed-site-span.rs b/src/test/ui/proc-macro/mixed-site-span.rs
deleted file mode 100644
index 008384656..000000000
--- a/src/test/ui/proc-macro/mixed-site-span.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Proc macros using `mixed_site` spans exhibit usual properties of `macro_rules` hygiene.
-
-// aux-build:mixed-site-span.rs
-
-#[macro_use]
-extern crate mixed_site_span;
-
-struct ItemUse;
-
-fn main() {
- 'label_use: loop {
- let local_use = 1;
- proc_macro_rules!();
- //~^ ERROR use of undeclared label `'label_use`
- //~| ERROR cannot find value `local_use` in this scope
- ItemDef; // OK
- local_def; //~ ERROR cannot find value `local_def` in this scope
- }
-}
-
-macro_rules! pass_dollar_crate {
- () => (proc_macro_rules!($crate);) //~ ERROR cannot find type `ItemUse` in crate `$crate`
-}
-pass_dollar_crate!();
diff --git a/src/test/ui/proc-macro/mixed-site-span.stderr b/src/test/ui/proc-macro/mixed-site-span.stderr
deleted file mode 100644
index 137860801..000000000
--- a/src/test/ui/proc-macro/mixed-site-span.stderr
+++ /dev/null
@@ -1,34 +0,0 @@
-error[E0426]: use of undeclared label `'label_use`
- --> $DIR/mixed-site-span.rs:13:9
- |
-LL | proc_macro_rules!();
- | ^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
- |
- = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0425]: cannot find value `local_use` in this scope
- --> $DIR/mixed-site-span.rs:13:9
- |
-LL | proc_macro_rules!();
- | ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
- |
- = note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0425]: cannot find value `local_def` in this scope
- --> $DIR/mixed-site-span.rs:17:9
- |
-LL | local_def;
- | ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
-
-error[E0412]: cannot find type `ItemUse` in crate `$crate`
- --> $DIR/mixed-site-span.rs:24:1
- |
-LL | pass_dollar_crate!();
- | ^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
- |
- = note: this error originates in the macro `proc_macro_rules` which comes from the expansion of the macro `pass_dollar_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0412, E0425, E0426.
-For more information about an error, try `rustc --explain E0412`.
diff --git a/src/test/ui/proc-macro/modify-ast.rs b/src/test/ui/proc-macro/modify-ast.rs
deleted file mode 100644
index ea9bf837c..000000000
--- a/src/test/ui/proc-macro/modify-ast.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// run-pass
-// aux-build:modify-ast.rs
-
-extern crate modify_ast;
-
-use modify_ast::*;
-
-#[derive(Foo)]
-pub struct MyStructc {
- #[cfg_attr(my_cfg, foo)]
- _a: i32,
-}
-
-macro_rules! a {
- ($i:item) => ($i)
-}
-
-a! {
- #[assert1]
- pub fn foo() {}
-}
-
-fn main() {
- let _a = MyStructc { _a: 0 };
- foo();
-}
diff --git a/src/test/ui/proc-macro/module.rs b/src/test/ui/proc-macro/module.rs
deleted file mode 100644
index 5777ed899..000000000
--- a/src/test/ui/proc-macro/module.rs
+++ /dev/null
@@ -1 +0,0 @@
-// ignore-test
diff --git a/src/test/ui/proc-macro/module_with_attrs.rs b/src/test/ui/proc-macro/module_with_attrs.rs
deleted file mode 100644
index 63e66a62a..000000000
--- a/src/test/ui/proc-macro/module_with_attrs.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-// ignore-test
-
-#![rustfmt::skip]
-#![print_attr]
diff --git a/src/test/ui/proc-macro/multispan.rs b/src/test/ui/proc-macro/multispan.rs
deleted file mode 100644
index e9e0349f2..000000000
--- a/src/test/ui/proc-macro/multispan.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// aux-build:multispan.rs
-
-extern crate multispan;
-
-use multispan::hello;
-
-fn main() {
- // This one emits no error.
- hello!();
-
- // Exactly one 'hi'.
- hello!(hi); //~ ERROR hello to you, too!
-
- // Now two, back to back.
- hello!(hi hi); //~ ERROR hello to you, too!
-
- // Now three, back to back.
- hello!(hi hi hi); //~ ERROR hello to you, too!
-
- // Now several, with spacing.
- hello!(hi hey hi yo hi beep beep hi hi); //~ ERROR hello to you, too!
- hello!(hi there, hi how are you? hi... hi.); //~ ERROR hello to you, too!
- hello!(whoah. hi di hi di ho); //~ ERROR hello to you, too!
- hello!(hi good hi and good bye); //~ ERROR hello to you, too!
-}
diff --git a/src/test/ui/proc-macro/multispan.stderr b/src/test/ui/proc-macro/multispan.stderr
deleted file mode 100644
index 0aea02bbd..000000000
--- a/src/test/ui/proc-macro/multispan.stderr
+++ /dev/null
@@ -1,93 +0,0 @@
-error: hello to you, too!
- --> $DIR/multispan.rs:12:5
- |
-LL | hello!(hi);
- | ^^^^^^^^^^
- |
-note: found these 'hi's
- --> $DIR/multispan.rs:12:12
- |
-LL | hello!(hi);
- | ^^
- = note: this error originates in the macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: hello to you, too!
- --> $DIR/multispan.rs:15:5
- |
-LL | hello!(hi hi);
- | ^^^^^^^^^^^^^
- |
-note: found these 'hi's
- --> $DIR/multispan.rs:15:12
- |
-LL | hello!(hi hi);
- | ^^ ^^
- = note: this error originates in the macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: hello to you, too!
- --> $DIR/multispan.rs:18:5
- |
-LL | hello!(hi hi hi);
- | ^^^^^^^^^^^^^^^^
- |
-note: found these 'hi's
- --> $DIR/multispan.rs:18:12
- |
-LL | hello!(hi hi hi);
- | ^^ ^^ ^^
- = note: this error originates in the macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: hello to you, too!
- --> $DIR/multispan.rs:21:5
- |
-LL | hello!(hi hey hi yo hi beep beep hi hi);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: found these 'hi's
- --> $DIR/multispan.rs:21:12
- |
-LL | hello!(hi hey hi yo hi beep beep hi hi);
- | ^^ ^^ ^^ ^^ ^^
- = note: this error originates in the macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: hello to you, too!
- --> $DIR/multispan.rs:22:5
- |
-LL | hello!(hi there, hi how are you? hi... hi.);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: found these 'hi's
- --> $DIR/multispan.rs:22:12
- |
-LL | hello!(hi there, hi how are you? hi... hi.);
- | ^^ ^^ ^^ ^^
- = note: this error originates in the macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: hello to you, too!
- --> $DIR/multispan.rs:23:5
- |
-LL | hello!(whoah. hi di hi di ho);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: found these 'hi's
- --> $DIR/multispan.rs:23:19
- |
-LL | hello!(whoah. hi di hi di ho);
- | ^^ ^^
- = note: this error originates in the macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: hello to you, too!
- --> $DIR/multispan.rs:24:5
- |
-LL | hello!(hi good hi and good bye);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: found these 'hi's
- --> $DIR/multispan.rs:24:12
- |
-LL | hello!(hi good hi and good bye);
- | ^^ ^^
- = note: this error originates in the macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 7 previous errors
-
diff --git a/src/test/ui/proc-macro/negative-token.rs b/src/test/ui/proc-macro/negative-token.rs
deleted file mode 100644
index 2ed3cbc08..000000000
--- a/src/test/ui/proc-macro/negative-token.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// run-pass
-// aux-build:negative-token.rs
-
-extern crate negative_token;
-
-use negative_token::*;
-
-fn main() {
- assert_eq!(-1, neg_one!());
- assert_eq!(-1.0, neg_one_float!());
-}
diff --git a/src/test/ui/proc-macro/nested-derive-cfg.rs b/src/test/ui/proc-macro/nested-derive-cfg.rs
deleted file mode 100644
index 53cfbb7c9..000000000
--- a/src/test/ui/proc-macro/nested-derive-cfg.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// compile-flags: -Z span-debug --error-format human
-// aux-build:test-macros.rs
-// check-pass
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-#[derive(Print)]
-struct Foo {
- #[cfg(FALSE)] removed: bool,
- my_array: [bool; {
- struct Inner {
- #[cfg(FALSE)] removed_inner_field: u8,
- non_removed_inner_field: usize
- }
- 0
- }]
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/nested-derive-cfg.stdout b/src/test/ui/proc-macro/nested-derive-cfg.stdout
deleted file mode 100644
index 9a562c971..000000000
--- a/src/test/ui/proc-macro/nested-derive-cfg.stdout
+++ /dev/null
@@ -1,81 +0,0 @@
-PRINT-DERIVE INPUT (DISPLAY): struct Foo
-{ my_array : [bool ; { struct Inner { non_removed_inner_field : usize } 0 }] }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/nested-derive-cfg.rs:12:1: 12:7 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/nested-derive-cfg.rs:12:8: 12:11 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "my_array",
- span: $DIR/nested-derive-cfg.rs:14:5: 14:13 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/nested-derive-cfg.rs:14:13: 14:14 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "bool",
- span: $DIR/nested-derive-cfg.rs:14:16: 14:20 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/nested-derive-cfg.rs:14:20: 14:21 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/nested-derive-cfg.rs:15:9: 15:15 (#0),
- },
- Ident {
- ident: "Inner",
- span: $DIR/nested-derive-cfg.rs:15:16: 15:21 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "non_removed_inner_field",
- span: $DIR/nested-derive-cfg.rs:17:13: 17:36 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/nested-derive-cfg.rs:17:36: 17:37 (#0),
- },
- Ident {
- ident: "usize",
- span: $DIR/nested-derive-cfg.rs:17:38: 17:43 (#0),
- },
- ],
- span: $DIR/nested-derive-cfg.rs:15:22: 18:10 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/nested-derive-cfg.rs:19:9: 19:10 (#0),
- },
- ],
- span: $DIR/nested-derive-cfg.rs:14:22: 20:6 (#0),
- },
- ],
- span: $DIR/nested-derive-cfg.rs:14:15: 20:7 (#0),
- },
- ],
- span: $DIR/nested-derive-cfg.rs:12:12: 21:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/nested-item-spans.rs b/src/test/ui/proc-macro/nested-item-spans.rs
deleted file mode 100644
index 63da170d0..000000000
--- a/src/test/ui/proc-macro/nested-item-spans.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[recollect_attr]
-fn another() {
- fn bar() {
- let x: u32 = "x"; //~ ERROR: mismatched types
- }
-
- bar();
-}
-
-fn main() {
- #[recollect_attr]
- fn bar() {
- let x: u32 = "x"; //~ ERROR: mismatched types
- }
-
- bar();
- another();
-}
diff --git a/src/test/ui/proc-macro/nested-item-spans.stderr b/src/test/ui/proc-macro/nested-item-spans.stderr
deleted file mode 100644
index 44b338fa6..000000000
--- a/src/test/ui/proc-macro/nested-item-spans.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/nested-item-spans.rs:9:22
- |
-LL | let x: u32 = "x";
- | --- ^^^ expected `u32`, found `&str`
- | |
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/nested-item-spans.rs:18:22
- |
-LL | let x: u32 = "x";
- | --- ^^^ expected `u32`, found `&str`
- | |
- | expected due to this
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/nested-macro-rules.rs b/src/test/ui/proc-macro/nested-macro-rules.rs
deleted file mode 100644
index 25ffcfad7..000000000
--- a/src/test/ui/proc-macro/nested-macro-rules.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// run-pass
-// aux-build:nested-macro-rules.rs
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug -Z macro-backtrace
-// edition:2018
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate nested_macro_rules;
-extern crate test_macros;
-
-use test_macros::{print_bang, print_attr};
-
-use nested_macro_rules::FirstStruct;
-struct SecondStruct;
-
-fn main() {
- nested_macro_rules::inner_macro!(print_bang, print_attr);
-
- nested_macro_rules::outer_macro!(SecondStruct, SecondAttrStruct);
- inner_macro!(print_bang, print_attr);
-}
diff --git a/src/test/ui/proc-macro/nested-macro-rules.stdout b/src/test/ui/proc-macro/nested-macro-rules.stdout
deleted file mode 100644
index 311139040..000000000
--- a/src/test/ui/proc-macro/nested-macro-rules.stdout
+++ /dev/null
@@ -1,46 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): FirstStruct
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Ident {
- ident: "FirstStruct",
- span: $DIR/auxiliary/nested-macro-rules.rs:16:14: 16:25 (#7),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): struct FirstAttrStruct {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#6),
- },
- Ident {
- ident: "FirstAttrStruct",
- span: $DIR/auxiliary/nested-macro-rules.rs:16:27: 16:42 (#7),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/auxiliary/nested-macro-rules.rs:10:57: 10:59 (#6),
- },
-]
-PRINT-BANG INPUT (DISPLAY): SecondStruct
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Ident {
- ident: "SecondStruct",
- span: $DIR/nested-macro-rules.rs:21:38: 21:50 (#16),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): struct SecondAttrStruct {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/auxiliary/nested-macro-rules.rs:10:32: 10:38 (#15),
- },
- Ident {
- ident: "SecondAttrStruct",
- span: $DIR/nested-macro-rules.rs:21:52: 21:68 (#16),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/auxiliary/nested-macro-rules.rs:10:57: 10:59 (#15),
- },
-]
diff --git a/src/test/ui/proc-macro/nested-nonterminal-tokens.rs b/src/test/ui/proc-macro/nested-nonterminal-tokens.rs
deleted file mode 100644
index 04d34e21c..000000000
--- a/src/test/ui/proc-macro/nested-nonterminal-tokens.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// check-pass
-// edition:2018
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-// Tests that we properly pass tokens to proc-macro when nested
-// nonterminals are involved.
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-
-macro_rules! wrap {
- (first, $e:expr) => { wrap!(second, $e + 1) };
- (second, $e:expr) => { wrap!(third, $e + 2) };
- (third, $e:expr) => {
- print_bang!($e + 3)
- };
-}
-
-fn main() {
- let _ = wrap!(first, 0);
-}
diff --git a/src/test/ui/proc-macro/nested-nonterminal-tokens.stdout b/src/test/ui/proc-macro/nested-nonterminal-tokens.stdout
deleted file mode 100644
index a3d24dd26..000000000
--- a/src/test/ui/proc-macro/nested-nonterminal-tokens.stdout
+++ /dev/null
@@ -1,60 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): 0 + 1 + 2 + 3
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/nested-nonterminal-tokens.rs:25:26: 25:27 (#0),
- },
- ],
- span: $DIR/nested-nonterminal-tokens.rs:17:41: 17:43 (#4),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nested-nonterminal-tokens.rs:17:44: 17:45 (#4),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/nested-nonterminal-tokens.rs:17:46: 17:47 (#4),
- },
- ],
- span: $DIR/nested-nonterminal-tokens.rs:18:41: 18:43 (#5),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nested-nonterminal-tokens.rs:18:44: 18:45 (#5),
- },
- Literal {
- kind: Integer,
- symbol: "2",
- suffix: None,
- span: $DIR/nested-nonterminal-tokens.rs:18:46: 18:47 (#5),
- },
- ],
- span: $DIR/nested-nonterminal-tokens.rs:20:21: 20:23 (#6),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nested-nonterminal-tokens.rs:20:24: 20:25 (#6),
- },
- Literal {
- kind: Integer,
- symbol: "3",
- suffix: None,
- span: $DIR/nested-nonterminal-tokens.rs:20:26: 20:27 (#6),
- },
-]
diff --git a/src/test/ui/proc-macro/no-macro-use-attr.rs b/src/test/ui/proc-macro/no-macro-use-attr.rs
deleted file mode 100644
index a8a8fa4e1..000000000
--- a/src/test/ui/proc-macro/no-macro-use-attr.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// aux-build:test-macros.rs
-
-#![feature(rustc_attrs)]
-#![warn(unused_extern_crates)]
-
-extern crate test_macros;
-//~^ WARN unused extern crate
-
-#[rustc_error]
-fn main() {} //~ ERROR fatal error triggered by #[rustc_error]
diff --git a/src/test/ui/proc-macro/no-macro-use-attr.stderr b/src/test/ui/proc-macro/no-macro-use-attr.stderr
deleted file mode 100644
index a9e5256a0..000000000
--- a/src/test/ui/proc-macro/no-macro-use-attr.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-warning: unused extern crate
- --> $DIR/no-macro-use-attr.rs:6:1
- |
-LL | extern crate test_macros;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
- |
-note: the lint level is defined here
- --> $DIR/no-macro-use-attr.rs:4:9
- |
-LL | #![warn(unused_extern_crates)]
- | ^^^^^^^^^^^^^^^^^^^^
-
-error: fatal error triggered by #[rustc_error]
- --> $DIR/no-macro-use-attr.rs:10:1
- |
-LL | fn main() {}
- | ^^^^^^^^^
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/src/test/ui/proc-macro/no-missing-docs.rs b/src/test/ui/proc-macro/no-missing-docs.rs
deleted file mode 100644
index e1e821858..000000000
--- a/src/test/ui/proc-macro/no-missing-docs.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//! Verify that the `decls` module implicitly added by the compiler does not cause `missing_docs`
-//! warnings.
-
-// build-pass (FIXME(62277): could be check-pass?)
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![deny(missing_docs)]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-/// Foo1.
-#[proc_macro]
-pub fn foo1(input: TokenStream) -> TokenStream { input }
diff --git a/src/test/ui/proc-macro/nodelim-groups.rs b/src/test/ui/proc-macro/nodelim-groups.rs
deleted file mode 100644
index ec3019902..000000000
--- a/src/test/ui/proc-macro/nodelim-groups.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// run-pass
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-// edition:2018
-//
-// Tests the pretty-printing behavior of inserting `Invisible`-delimited groups
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate test_macros;
-use test_macros::print_bang_consume;
-
-macro_rules! expand_it {
- (($val1:expr) ($val2:expr)) => { expand_it!($val1 + $val2) };
- ($val:expr) => { print_bang_consume!("hi" $val (1 + 1)) };
-}
-
-fn main() {
- expand_it!(1 + (25) + 1);
- expand_it!(("hello".len()) ("world".len()));
-}
diff --git a/src/test/ui/proc-macro/nodelim-groups.stdout b/src/test/ui/proc-macro/nodelim-groups.stdout
deleted file mode 100644
index 6b410f0bf..000000000
--- a/src/test/ui/proc-macro/nodelim-groups.stdout
+++ /dev/null
@@ -1,167 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): "hi" 1 + (25) + 1 (1 + 1)
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Literal {
- kind: Str,
- symbol: "hi",
- suffix: None,
- span: $DIR/nodelim-groups.rs:16:42: 16:46 (#4),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/nodelim-groups.rs:20:16: 20:17 (#0),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nodelim-groups.rs:20:18: 20:19 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "25",
- suffix: None,
- span: $DIR/nodelim-groups.rs:20:21: 20:23 (#0),
- },
- ],
- span: $DIR/nodelim-groups.rs:20:20: 20:24 (#0),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nodelim-groups.rs:20:25: 20:26 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/nodelim-groups.rs:20:27: 20:28 (#0),
- },
- ],
- span: $DIR/nodelim-groups.rs:16:47: 16:51 (#4),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/nodelim-groups.rs:16:53: 16:54 (#4),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nodelim-groups.rs:16:55: 16:56 (#4),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/nodelim-groups.rs:16:57: 16:58 (#4),
- },
- ],
- span: $DIR/nodelim-groups.rs:16:52: 16:59 (#4),
- },
-]
-PRINT-BANG INPUT (DISPLAY): "hi" "hello".len() + "world".len() (1 + 1)
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Literal {
- kind: Str,
- symbol: "hi",
- suffix: None,
- span: $DIR/nodelim-groups.rs:16:42: 16:46 (#9),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Str,
- symbol: "hello",
- suffix: None,
- span: $DIR/nodelim-groups.rs:21:17: 21:24 (#0),
- },
- Punct {
- ch: '.',
- spacing: Alone,
- span: $DIR/nodelim-groups.rs:21:24: 21:25 (#0),
- },
- Ident {
- ident: "len",
- span: $DIR/nodelim-groups.rs:21:25: 21:28 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/nodelim-groups.rs:21:28: 21:30 (#0),
- },
- ],
- span: $DIR/nodelim-groups.rs:15:49: 15:54 (#8),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nodelim-groups.rs:15:55: 15:56 (#8),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Literal {
- kind: Str,
- symbol: "world",
- suffix: None,
- span: $DIR/nodelim-groups.rs:21:33: 21:40 (#0),
- },
- Punct {
- ch: '.',
- spacing: Alone,
- span: $DIR/nodelim-groups.rs:21:40: 21:41 (#0),
- },
- Ident {
- ident: "len",
- span: $DIR/nodelim-groups.rs:21:41: 21:44 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/nodelim-groups.rs:21:44: 21:46 (#0),
- },
- ],
- span: $DIR/nodelim-groups.rs:15:57: 15:62 (#8),
- },
- ],
- span: $DIR/nodelim-groups.rs:16:47: 16:51 (#9),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/nodelim-groups.rs:16:53: 16:54 (#9),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/nodelim-groups.rs:16:55: 16:56 (#9),
- },
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/nodelim-groups.rs:16:57: 16:58 (#9),
- },
- ],
- span: $DIR/nodelim-groups.rs:16:52: 16:59 (#9),
- },
-]
diff --git a/src/test/ui/proc-macro/non-root.rs b/src/test/ui/proc-macro/non-root.rs
deleted file mode 100644
index a7c4ac00a..000000000
--- a/src/test/ui/proc-macro/non-root.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-fn foo(arg: TokenStream) -> TokenStream {
- #[proc_macro]
- pub fn foo(arg: TokenStream) -> TokenStream { arg }
- //~^ ERROR functions tagged with `#[proc_macro]` must currently reside in the root of the crate
-
- arg
-}
diff --git a/src/test/ui/proc-macro/non-root.stderr b/src/test/ui/proc-macro/non-root.stderr
deleted file mode 100644
index 90f94b677..000000000
--- a/src/test/ui/proc-macro/non-root.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: functions tagged with `#[proc_macro]` must currently reside in the root of the crate
- --> $DIR/non-root.rs:11:5
- |
-LL | pub fn foo(arg: TokenStream) -> TokenStream { arg }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/nonterminal-expansion.rs b/src/test/ui/proc-macro/nonterminal-expansion.rs
deleted file mode 100644
index e62155871..000000000
--- a/src/test/ui/proc-macro/nonterminal-expansion.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug
-// aux-build:test-macros.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! pass_nonterminal {
- ($line:expr) => {
- #[print_attr_args(a, $line, b)]
- struct S;
- };
-}
-
-// `line!()` is not expanded before it's passed to the proc macro.
-pass_nonterminal!(line!());
-
-// Test case from #43860.
-
-#[macro_export]
-macro_rules! use_contract {
- ($name: ident, $path: expr) => {
- #[derive(Empty)]
- #[empty_helper(path = $path)] // OK
- pub struct $name<T, C> {
- api: T,
- contract: C,
- }
- };
-}
-
-use_contract!(ContractName, file!());
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/nonterminal-expansion.stdout b/src/test/ui/proc-macro/nonterminal-expansion.stdout
deleted file mode 100644
index 4d884348f..000000000
--- a/src/test/ui/proc-macro/nonterminal-expansion.stdout
+++ /dev/null
@@ -1,42 +0,0 @@
-PRINT-ATTR_ARGS INPUT (DISPLAY): a, line!(), b
-PRINT-ATTR_ARGS RE-COLLECTED (DISPLAY): a, line! (), b
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "a",
- span: $DIR/nonterminal-expansion.rs:13:27: 13:28 (#4),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/nonterminal-expansion.rs:13:28: 13:29 (#4),
- },
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "line",
- span: $DIR/nonterminal-expansion.rs:19:19: 19:23 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/nonterminal-expansion.rs:19:23: 19:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/nonterminal-expansion.rs:19:24: 19:26 (#0),
- },
- ],
- span: $DIR/nonterminal-expansion.rs:13:30: 13:35 (#4),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/nonterminal-expansion.rs:13:35: 13:36 (#4),
- },
- Ident {
- ident: "b",
- span: $DIR/nonterminal-expansion.rs:13:37: 13:38 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/nonterminal-recollect-attr.rs b/src/test/ui/proc-macro/nonterminal-recollect-attr.rs
deleted file mode 100644
index 79c4ad4cd..000000000
--- a/src/test/ui/proc-macro/nonterminal-recollect-attr.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// check-pass
-// compile-flags: -Z span-debug
-// aux-build:nonterminal-recollect-attr.rs
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate nonterminal_recollect_attr;
-use nonterminal_recollect_attr::*;
-
-macro_rules! my_macro {
- ($v:ident) => {
- #[first_attr]
- $v struct Foo {
- field: u8
- }
- }
-}
-
-my_macro!(pub);
-fn main() {}
diff --git a/src/test/ui/proc-macro/nonterminal-recollect-attr.stdout b/src/test/ui/proc-macro/nonterminal-recollect-attr.stdout
deleted file mode 100644
index 6824395ae..000000000
--- a/src/test/ui/proc-macro/nonterminal-recollect-attr.stdout
+++ /dev/null
@@ -1,66 +0,0 @@
-First recollected: TokenStream [
- Ident {
- ident: "pub",
- span: $DIR/nonterminal-recollect-attr.rs:20:11: 20:14 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/nonterminal-recollect-attr.rs:14:12: 14:18 (#4),
- },
- Ident {
- ident: "Foo",
- span: $DIR/nonterminal-recollect-attr.rs:14:19: 14:22 (#4),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "field",
- span: $DIR/nonterminal-recollect-attr.rs:15:13: 15:18 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/nonterminal-recollect-attr.rs:15:18: 15:19 (#4),
- },
- Ident {
- ident: "u8",
- span: $DIR/nonterminal-recollect-attr.rs:15:20: 15:22 (#4),
- },
- ],
- span: $DIR/nonterminal-recollect-attr.rs:14:23: 16:10 (#4),
- },
-]
-Second recollected: TokenStream [
- Ident {
- ident: "pub",
- span: $DIR/nonterminal-recollect-attr.rs:20:11: 20:14 (#0),
- },
- Ident {
- ident: "struct",
- span: $DIR/nonterminal-recollect-attr.rs:14:12: 14:18 (#4),
- },
- Ident {
- ident: "Foo",
- span: $DIR/nonterminal-recollect-attr.rs:14:19: 14:22 (#4),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "field",
- span: $DIR/nonterminal-recollect-attr.rs:15:13: 15:18 (#4),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/nonterminal-recollect-attr.rs:15:18: 15:19 (#4),
- },
- Ident {
- ident: "u8",
- span: $DIR/nonterminal-recollect-attr.rs:15:20: 15:22 (#4),
- },
- ],
- span: $DIR/nonterminal-recollect-attr.rs:14:23: 16:10 (#4),
- },
-]
diff --git a/src/test/ui/proc-macro/nonterminal-token-hygiene.rs b/src/test/ui/proc-macro/nonterminal-token-hygiene.rs
deleted file mode 100644
index fa52a975b..000000000
--- a/src/test/ui/proc-macro/nonterminal-token-hygiene.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Make sure that marks from declarative macros are applied to tokens in nonterminal.
-
-// check-pass
-// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene
-// compile-flags: -Z trim-diagnostic-paths=no
-// normalize-stdout-test "\d+#" -> "0#"
-// normalize-stdout-test "expn\d{3,}" -> "expnNNN"
-// aux-build:test-macros.rs
-
-#![feature(decl_macro)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-macro_rules! outer {
- ($item:item) => {
- macro inner() {
- print_bang! { $item }
- }
-
- inner!();
- };
-}
-
-struct S;
-
-outer! {
- struct S; // OK, not a duplicate definition of `S`
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/nonterminal-token-hygiene.stdout b/src/test/ui/proc-macro/nonterminal-token-hygiene.stdout
deleted file mode 100644
index c08e53081..000000000
--- a/src/test/ui/proc-macro/nonterminal-token-hygiene.stdout
+++ /dev/null
@@ -1,92 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): struct S;
-PRINT-BANG RE-COLLECTED (DISPLAY): struct S ;
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: None,
- stream: TokenStream [
- Ident {
- ident: "struct",
- span: $DIR/nonterminal-token-hygiene.rs:31:5: 31:11 (#5),
- },
- Ident {
- ident: "S",
- span: $DIR/nonterminal-token-hygiene.rs:31:12: 31:13 (#5),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/nonterminal-token-hygiene.rs:31:13: 31:14 (#5),
- },
- ],
- span: $DIR/nonterminal-token-hygiene.rs:21:27: 21:32 (#6),
- },
-]
-#![feature /* 0#0 */(prelude_import)]
-#![no_std /* 0#0 */]
-// Make sure that marks from declarative macros are applied to tokens in nonterminal.
-
-// check-pass
-// compile-flags: -Z span-debug -Z macro-backtrace -Z unpretty=expanded,hygiene
-// compile-flags: -Z trim-diagnostic-paths=no
-// normalize-stdout-test "\d+#" -> "0#"
-// normalize-stdout-test "expn\d{3,}" -> "expnNNN"
-// aux-build:test-macros.rs
-
-#![feature /* 0#0 */(decl_macro)]
-
-#![no_std /* 0#0 */]
-#[prelude_import /* 0#1 */]
-use ::core /* 0#1 */::prelude /* 0#1 */::rust_2015 /* 0#1 */::*;
-#[macro_use /* 0#1 */]
-extern crate core /* 0#2 */;
-#[macro_use /* 0#1 */]
-extern crate compiler_builtins /* 0#2 */;
-// Don't load unnecessary hygiene information from std
-extern crate std /* 0#0 */;
-
-#[macro_use /* 0#0 */]
-extern crate test_macros /* 0#0 */;
-
-macro_rules! outer
- /*
- 0#0
- */ {
- ($item : item) =>
- {
- macro inner() { print_bang! { $item } } inner! () ;
-
- } ;
-}
-
-struct S /* 0#0 */;
-macro inner /* 0#4 */ { () => { print_bang! { struct S; } } }
-
-struct S /* 0#5 */;
-// OK, not a duplicate definition of `S`
-
-fn main /* 0#0 */() {}
-
-/*
-Expansions:
-crate0::{{expn0}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Root
-crate0::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
-crate0::{{expn2}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "outer")
-crate0::{{expn3}}: parent: crate0::{{expn2}}, call_site_ctxt: #4, def_site_ctxt: #4, kind: Macro(Bang, "inner")
-crate0::{{expn4}}: parent: crate0::{{expn3}}, call_site_ctxt: #6, def_site_ctxt: #0, kind: Macro(Bang, "print_bang")
-crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
-crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Attr, "derive")
-crate1::{{expnNNN}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: Macro(Bang, "include")
-crate2::{{expn1}}: parent: crate0::{{expn0}}, call_site_ctxt: #0, def_site_ctxt: #0, kind: AstPass(StdImports)
-
-SyntaxContexts:
-#0: parent: #0, outer_mark: (crate0::{{expn0}}, Opaque)
-#1: parent: #0, outer_mark: (crate0::{{expn1}}, Opaque)
-#2: parent: #0, outer_mark: (crate0::{{expn1}}, Transparent)
-#3: parent: #0, outer_mark: (crate2::{{expn1}}, Opaque)
-#4: parent: #0, outer_mark: (crate0::{{expn2}}, SemiTransparent)
-#5: parent: #0, outer_mark: (crate0::{{expn3}}, Opaque)
-#6: parent: #4, outer_mark: (crate0::{{expn3}}, Opaque)
-#7: parent: #0, outer_mark: (crate0::{{expn4}}, Opaque)
-#8: parent: #6, outer_mark: (crate0::{{expn4}}, Transparent)
-#9: parent: #5, outer_mark: (crate0::{{expn4}}, SemiTransparent)
-*/
diff --git a/src/test/ui/proc-macro/not-joint.rs b/src/test/ui/proc-macro/not-joint.rs
deleted file mode 100644
index 30da2811e..000000000
--- a/src/test/ui/proc-macro/not-joint.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// run-pass
-// aux-build:not-joint.rs
-
-extern crate not_joint as bar;
-use bar::{tokens, nothing};
-
-tokens![< -];
-
-#[nothing]
-a![< -];
-
-#[nothing]
-b!{< -}
-
-#[nothing]
-c!(< -);
-
-#[nothing]
-fn foo() {
- //! dox
- let x = 2 < - 3;
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/out-of-line-mod.rs b/src/test/ui/proc-macro/out-of-line-mod.rs
deleted file mode 100644
index 658ed6c18..000000000
--- a/src/test/ui/proc-macro/out-of-line-mod.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Out-of-line module is found on the filesystem if passed through a proc macro (issue #58818).
-
-// check-pass
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-mod outer {
- identity! { mod inner; }
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/outer/inner.rs b/src/test/ui/proc-macro/outer/inner.rs
deleted file mode 100644
index 5777ed899..000000000
--- a/src/test/ui/proc-macro/outer/inner.rs
+++ /dev/null
@@ -1 +0,0 @@
-// ignore-test
diff --git a/src/test/ui/proc-macro/parent-source-spans.rs b/src/test/ui/proc-macro/parent-source-spans.rs
deleted file mode 100644
index 354657db4..000000000
--- a/src/test/ui/proc-macro/parent-source-spans.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// aux-build:parent-source-spans.rs
-
-#![feature(decl_macro)]
-
-extern crate parent_source_spans;
-
-use parent_source_spans::parent_source_spans;
-
-macro one($a:expr, $b:expr) {
- two!($a, $b);
- //~^ ERROR first parent: "hello"
- //~| ERROR second parent: "world"
-}
-
-macro two($a:expr, $b:expr) {
- three!($a, $b);
- //~^ ERROR first final: "hello"
- //~| ERROR second final: "world"
- //~| ERROR first final: "yay"
- //~| ERROR second final: "rust"
-}
-
-// forwarding tokens directly doesn't create a new source chain
-macro three($($tokens:tt)*) {
- four!($($tokens)*);
-}
-
-macro four($($tokens:tt)*) {
- parent_source_spans!($($tokens)*);
- //~^ ERROR cannot find value `ok` in this scope
- //~| ERROR cannot find value `ok` in this scope
- //~| ERROR cannot find value `ok` in this scope
-}
-
-fn main() {
- one!("hello", "world");
- //~^ ERROR first grandparent: "hello"
- //~| ERROR second grandparent: "world"
- //~| ERROR first source: "hello"
- //~| ERROR second source: "world"
-
- two!("yay", "rust");
- //~^ ERROR first parent: "yay"
- //~| ERROR second parent: "rust"
- //~| ERROR first source: "yay"
- //~| ERROR second source: "rust"
-
- three!("hip", "hop");
- //~^ ERROR first final: "hip"
- //~| ERROR second final: "hop"
- //~| ERROR first source: "hip"
- //~| ERROR second source: "hop"
-}
diff --git a/src/test/ui/proc-macro/parent-source-spans.stderr b/src/test/ui/proc-macro/parent-source-spans.stderr
deleted file mode 100644
index 65ce24e55..000000000
--- a/src/test/ui/proc-macro/parent-source-spans.stderr
+++ /dev/null
@@ -1,189 +0,0 @@
-error: first final: "hello"
- --> $DIR/parent-source-spans.rs:16:12
- |
-LL | three!($a, $b);
- | ^^
-...
-LL | one!("hello", "world");
- | ---------------------- in this macro invocation
- |
- = note: this error originates in the macro `two` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: second final: "world"
- --> $DIR/parent-source-spans.rs:16:16
- |
-LL | three!($a, $b);
- | ^^
-...
-LL | one!("hello", "world");
- | ---------------------- in this macro invocation
- |
- = note: this error originates in the macro `two` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: first parent: "hello"
- --> $DIR/parent-source-spans.rs:10:5
- |
-LL | two!($a, $b);
- | ^^^^^^^^^^^^
-...
-LL | one!("hello", "world");
- | ---------------------- in this macro invocation
- |
- = note: this error originates in the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: second parent: "world"
- --> $DIR/parent-source-spans.rs:10:5
- |
-LL | two!($a, $b);
- | ^^^^^^^^^^^^
-...
-LL | one!("hello", "world");
- | ---------------------- in this macro invocation
- |
- = note: this error originates in the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: first grandparent: "hello"
- --> $DIR/parent-source-spans.rs:36:5
- |
-LL | one!("hello", "world");
- | ^^^^^^^^^^^^^^^^^^^^^^
-
-error: second grandparent: "world"
- --> $DIR/parent-source-spans.rs:36:5
- |
-LL | one!("hello", "world");
- | ^^^^^^^^^^^^^^^^^^^^^^
-
-error: first source: "hello"
- --> $DIR/parent-source-spans.rs:36:5
- |
-LL | one!("hello", "world");
- | ^^^^^^^^^^^^^^^^^^^^^^
-
-error: second source: "world"
- --> $DIR/parent-source-spans.rs:36:5
- |
-LL | one!("hello", "world");
- | ^^^^^^^^^^^^^^^^^^^^^^
-
-error: first final: "yay"
- --> $DIR/parent-source-spans.rs:16:12
- |
-LL | three!($a, $b);
- | ^^
-...
-LL | two!("yay", "rust");
- | ------------------- in this macro invocation
- |
- = note: this error originates in the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: second final: "rust"
- --> $DIR/parent-source-spans.rs:16:16
- |
-LL | three!($a, $b);
- | ^^
-...
-LL | two!("yay", "rust");
- | ------------------- in this macro invocation
- |
- = note: this error originates in the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: first parent: "yay"
- --> $DIR/parent-source-spans.rs:42:5
- |
-LL | two!("yay", "rust");
- | ^^^^^^^^^^^^^^^^^^^
-
-error: second parent: "rust"
- --> $DIR/parent-source-spans.rs:42:5
- |
-LL | two!("yay", "rust");
- | ^^^^^^^^^^^^^^^^^^^
-
-error: first source: "yay"
- --> $DIR/parent-source-spans.rs:42:5
- |
-LL | two!("yay", "rust");
- | ^^^^^^^^^^^^^^^^^^^
-
-error: second source: "rust"
- --> $DIR/parent-source-spans.rs:42:5
- |
-LL | two!("yay", "rust");
- | ^^^^^^^^^^^^^^^^^^^
-
-error: first final: "hip"
- --> $DIR/parent-source-spans.rs:48:12
- |
-LL | three!("hip", "hop");
- | ^^^^^
-
-error: second final: "hop"
- --> $DIR/parent-source-spans.rs:48:19
- |
-LL | three!("hip", "hop");
- | ^^^^^
-
-error: first source: "hip"
- --> $DIR/parent-source-spans.rs:48:12
- |
-LL | three!("hip", "hop");
- | ^^^^^
-
-error: second source: "hop"
- --> $DIR/parent-source-spans.rs:48:19
- |
-LL | three!("hip", "hop");
- | ^^^^^
-
-error[E0425]: cannot find value `ok` in this scope
- --> $DIR/parent-source-spans.rs:29:5
- |
-LL | parent_source_spans!($($tokens)*);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
-...
-LL | one!("hello", "world");
- | ---------------------- in this macro invocation
- |
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | -- similarly named tuple variant `Ok` defined here
- |
- = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0425]: cannot find value `ok` in this scope
- --> $DIR/parent-source-spans.rs:29:5
- |
-LL | parent_source_spans!($($tokens)*);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
-...
-LL | two!("yay", "rust");
- | ------------------- in this macro invocation
- |
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | -- similarly named tuple variant `Ok` defined here
- |
- = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0425]: cannot find value `ok` in this scope
- --> $DIR/parent-source-spans.rs:29:5
- |
-LL | parent_source_spans!($($tokens)*);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
-...
-LL | three!("hip", "hop");
- | -------------------- in this macro invocation
- |
- ::: $SRC_DIR/core/src/result.rs:LL:COL
- |
-LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
- | -- similarly named tuple variant `Ok` defined here
- |
- = note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `three` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 21 previous errors
-
-For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/proc-macro/pretty-print-hack-hide.rs b/src/test/ui/proc-macro/pretty-print-hack-hide.rs
deleted file mode 100644
index f53e8fe82..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack-hide.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-// check-pass
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use] extern crate test_macros;
-
-include!("pretty-print-hack/rental-0.5.6/src/lib.rs");
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/pretty-print-hack-hide.stdout b/src/test/ui/proc-macro/pretty-print-hack-hide.stdout
deleted file mode 100644
index ea796bb26..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack-hide.stdout
+++ /dev/null
@@ -1,21 +0,0 @@
-PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:1: 4:5 (#0),
- },
- Ident {
- ident: "ProceduralMasqueradeDummyType",
- span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:6: 4:35 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "Input",
- span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:13:5: 13:10 (#0),
- },
- ],
- span: $DIR/pretty-print-hack/rental-0.5.6/src/lib.rs:4:36: 14:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/pretty-print-hack-show.rs b/src/test/ui/proc-macro/pretty-print-hack-show.rs
deleted file mode 100644
index 9b1899e49..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack-show.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use] extern crate test_macros;
-
-mod first {
- include!("pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs");
-}
-
-mod second {
- include!("pretty-print-hack/rental-0.5.5/src/lib.rs");
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/pretty-print-hack-show.stderr b/src/test/ui/proc-macro/pretty-print-hack-show.stderr
deleted file mode 100644
index 873054927..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack-show.stderr
+++ /dev/null
@@ -1,179 +0,0 @@
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
-
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
-
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
-
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
-
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
-
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
-
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
-
-error: aborting due to 8 previous errors
-
-Future incompatibility report: Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
-Future breakage diagnostic:
-error: using an old version of `rental`
- --> $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6
- |
-LL | enum ProceduralMasqueradeDummyType {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125>
- = note: older versions of the `rental` crate will stop compiling in future versions of Rust; please update to `rental` v0.5.6, or switch to one of the `rental` alternatives
- = note: `#[deny(proc_macro_back_compat)]` on by default
-
diff --git a/src/test/ui/proc-macro/pretty-print-hack-show.stdout b/src/test/ui/proc-macro/pretty-print-hack-show.stdout
deleted file mode 100644
index 3d793d2a0..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack-show.stdout
+++ /dev/null
@@ -1,44 +0,0 @@
-PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input, }
-PRINT-DERIVE RE-COLLECTED (DISPLAY): enum ProceduralMasqueradeDummyType { Input }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:1: 4:5 (#0),
- },
- Ident {
- ident: "ProceduralMasqueradeDummyType",
- span: $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:6: 4:35 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "Input",
- span: $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:13:5: 13:10 (#0),
- },
- ],
- span: $DIR/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs:4:36: 14:2 (#0),
- },
-]
-PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input, }
-PRINT-DERIVE RE-COLLECTED (DISPLAY): enum ProceduralMasqueradeDummyType { Input }
-PRINT-DERIVE INPUT (DEBUG): TokenStream [
- Ident {
- ident: "enum",
- span: $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:1: 4:5 (#0),
- },
- Ident {
- ident: "ProceduralMasqueradeDummyType",
- span: $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:6: 4:35 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "Input",
- span: $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:13:5: 13:10 (#0),
- },
- ],
- span: $DIR/pretty-print-hack/rental-0.5.5/src/lib.rs:4:36: 14:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs b/src/test/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs
deleted file mode 100644
index 9501980fa..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// ignore-test
-
-#[derive(Print)]
-enum ProceduralMasqueradeDummyType {
-//~^ ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
- Input
-}
diff --git a/src/test/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs b/src/test/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs
deleted file mode 100644
index 9501980fa..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// ignore-test
-
-#[derive(Print)]
-enum ProceduralMasqueradeDummyType {
-//~^ ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
- Input
-}
diff --git a/src/test/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs b/src/test/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs
deleted file mode 100644
index 9501980fa..000000000
--- a/src/test/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// ignore-test
-
-#[derive(Print)]
-enum ProceduralMasqueradeDummyType {
-//~^ ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
-//~| ERROR using
-//~| WARN this was previously
- Input
-}
diff --git a/src/test/ui/proc-macro/pretty-print-tts.rs b/src/test/ui/proc-macro/pretty-print-tts.rs
deleted file mode 100644
index ffe2a7415..000000000
--- a/src/test/ui/proc-macro/pretty-print-tts.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-
-#![feature(rustc_attrs)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-#[macro_use]
-extern crate test_macros;
-
-// Tests the pretty-printing behavior of various (unparsed) tokens
-print_bang_consume!({
- #![rustc_dummy]
- let a = "hello".len();
- matches!(a, 5);
-});
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/pretty-print-tts.stdout b/src/test/ui/proc-macro/pretty-print-tts.stdout
deleted file mode 100644
index f52e97a86..000000000
--- a/src/test/ui/proc-macro/pretty-print-tts.stdout
+++ /dev/null
@@ -1,102 +0,0 @@
-PRINT-BANG INPUT (DISPLAY): { #! [rustc_dummy] let a = "hello".len() ; matches! (a, 5) ; }
-PRINT-BANG INPUT (DEBUG): TokenStream [
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/pretty-print-tts.rs:15:5: 15:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/pretty-print-tts.rs:15:6: 15:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "rustc_dummy",
- span: $DIR/pretty-print-tts.rs:15:8: 15:19 (#0),
- },
- ],
- span: $DIR/pretty-print-tts.rs:15:7: 15:20 (#0),
- },
- Ident {
- ident: "let",
- span: $DIR/pretty-print-tts.rs:16:5: 16:8 (#0),
- },
- Ident {
- ident: "a",
- span: $DIR/pretty-print-tts.rs:16:9: 16:10 (#0),
- },
- Punct {
- ch: '=',
- spacing: Alone,
- span: $DIR/pretty-print-tts.rs:16:11: 16:12 (#0),
- },
- Literal {
- kind: Str,
- symbol: "hello",
- suffix: None,
- span: $DIR/pretty-print-tts.rs:16:13: 16:20 (#0),
- },
- Punct {
- ch: '.',
- spacing: Alone,
- span: $DIR/pretty-print-tts.rs:16:20: 16:21 (#0),
- },
- Ident {
- ident: "len",
- span: $DIR/pretty-print-tts.rs:16:21: 16:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/pretty-print-tts.rs:16:24: 16:26 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/pretty-print-tts.rs:16:26: 16:27 (#0),
- },
- Ident {
- ident: "matches",
- span: $DIR/pretty-print-tts.rs:17:5: 17:12 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/pretty-print-tts.rs:17:12: 17:13 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "a",
- span: $DIR/pretty-print-tts.rs:17:14: 17:15 (#0),
- },
- Punct {
- ch: ',',
- spacing: Alone,
- span: $DIR/pretty-print-tts.rs:17:15: 17:16 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "5",
- suffix: None,
- span: $DIR/pretty-print-tts.rs:17:17: 17:18 (#0),
- },
- ],
- span: $DIR/pretty-print-tts.rs:17:13: 17:19 (#0),
- },
- Punct {
- ch: ';',
- spacing: Alone,
- span: $DIR/pretty-print-tts.rs:17:19: 17:20 (#0),
- },
- ],
- span: $DIR/pretty-print-tts.rs:14:21: 18:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/proc-macro-attributes.rs b/src/test/ui/proc-macro/proc-macro-attributes.rs
deleted file mode 100644
index 8d96381b9..000000000
--- a/src/test/ui/proc-macro/proc-macro-attributes.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// aux-build:derive-b.rs
-
-#[macro_use]
-extern crate derive_b;
-
-#[B] //~ ERROR `B` is ambiguous
- //~| WARN derive helper attribute is used before it is introduced
- //~| WARN this was previously accepted
-#[C] //~ ERROR cannot find attribute `C` in this scope
-#[B(D)] //~ ERROR `B` is ambiguous
- //~| WARN derive helper attribute is used before it is introduced
- //~| WARN this was previously accepted
-#[B(E = "foo")] //~ ERROR `B` is ambiguous
- //~| WARN derive helper attribute is used before it is introduced
- //~| WARN this was previously accepted
-#[B(arbitrary tokens)] //~ ERROR `B` is ambiguous
- //~| WARN derive helper attribute is used before it is introduced
- //~| WARN this was previously accepted
-#[derive(B)]
-struct B;
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/proc-macro-attributes.stderr b/src/test/ui/proc-macro/proc-macro-attributes.stderr
deleted file mode 100644
index 140d87906..000000000
--- a/src/test/ui/proc-macro/proc-macro-attributes.stderr
+++ /dev/null
@@ -1,130 +0,0 @@
-error: cannot find attribute `C` in this scope
- --> $DIR/proc-macro-attributes.rs:9:3
- |
-LL | #[C]
- | ^ help: a derive helper attribute with a similar name exists: `B`
-
-error[E0659]: `B` is ambiguous
- --> $DIR/proc-macro-attributes.rs:6:3
- |
-LL | #[B]
- | ^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a derive helper attribute
-note: `B` could refer to the derive helper attribute defined here
- --> $DIR/proc-macro-attributes.rs:19:10
- |
-LL | #[derive(B)]
- | ^
-note: `B` could also refer to the derive macro imported here
- --> $DIR/proc-macro-attributes.rs:3:1
- |
-LL | #[macro_use]
- | ^^^^^^^^^^^^
-
-error[E0659]: `B` is ambiguous
- --> $DIR/proc-macro-attributes.rs:10:3
- |
-LL | #[B(D)]
- | ^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a derive helper attribute
-note: `B` could refer to the derive helper attribute defined here
- --> $DIR/proc-macro-attributes.rs:19:10
- |
-LL | #[derive(B)]
- | ^
-note: `B` could also refer to the derive macro imported here
- --> $DIR/proc-macro-attributes.rs:3:1
- |
-LL | #[macro_use]
- | ^^^^^^^^^^^^
-
-error[E0659]: `B` is ambiguous
- --> $DIR/proc-macro-attributes.rs:13:3
- |
-LL | #[B(E = "foo")]
- | ^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a derive helper attribute
-note: `B` could refer to the derive helper attribute defined here
- --> $DIR/proc-macro-attributes.rs:19:10
- |
-LL | #[derive(B)]
- | ^
-note: `B` could also refer to the derive macro imported here
- --> $DIR/proc-macro-attributes.rs:3:1
- |
-LL | #[macro_use]
- | ^^^^^^^^^^^^
-
-error[E0659]: `B` is ambiguous
- --> $DIR/proc-macro-attributes.rs:16:3
- |
-LL | #[B(arbitrary tokens)]
- | ^ ambiguous name
- |
- = note: ambiguous because of a name conflict with a derive helper attribute
-note: `B` could refer to the derive helper attribute defined here
- --> $DIR/proc-macro-attributes.rs:19:10
- |
-LL | #[derive(B)]
- | ^
-note: `B` could also refer to the derive macro imported here
- --> $DIR/proc-macro-attributes.rs:3:1
- |
-LL | #[macro_use]
- | ^^^^^^^^^^^^
-
-warning: derive helper attribute is used before it is introduced
- --> $DIR/proc-macro-attributes.rs:6:3
- |
-LL | #[B]
- | ^
-...
-LL | #[derive(B)]
- | - the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
- = note: `#[warn(legacy_derive_helpers)]` on by default
-
-warning: derive helper attribute is used before it is introduced
- --> $DIR/proc-macro-attributes.rs:10:3
- |
-LL | #[B(D)]
- | ^
-...
-LL | #[derive(B)]
- | - the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-
-warning: derive helper attribute is used before it is introduced
- --> $DIR/proc-macro-attributes.rs:13:3
- |
-LL | #[B(E = "foo")]
- | ^
-...
-LL | #[derive(B)]
- | - the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-
-warning: derive helper attribute is used before it is introduced
- --> $DIR/proc-macro-attributes.rs:16:3
- |
-LL | #[B(arbitrary tokens)]
- | ^
-...
-LL | #[derive(B)]
- | - the attribute is introduced here
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>
-
-error: aborting due to 5 previous errors; 4 warnings emitted
-
-For more information about this error, try `rustc --explain E0659`.
diff --git a/src/test/ui/proc-macro/proc-macro-deprecated-attr.rs b/src/test/ui/proc-macro/proc-macro-deprecated-attr.rs
deleted file mode 100644
index f1144a4a5..000000000
--- a/src/test/ui/proc-macro/proc-macro-deprecated-attr.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// check-pass
-// force-host
-// no-prefer-dynamic
-
-#![deny(deprecated)]
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-#[deprecated(since = "1.0.0", note = "test")]
-pub fn test_compile_without_warning_with_deprecated(_: TokenStream) -> TokenStream {
- TokenStream::new()
-}
diff --git a/src/test/ui/proc-macro/proc-macro-gates.rs b/src/test/ui/proc-macro/proc-macro-gates.rs
deleted file mode 100644
index e2cf4e739..000000000
--- a/src/test/ui/proc-macro/proc-macro-gates.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// aux-build:test-macros.rs
-// gate-test-proc_macro_hygiene
-
-#![feature(stmt_expr_attributes)]
-
-#[macro_use]
-extern crate test_macros;
-
-fn _test_inner() {
- #![empty_attr] //~ ERROR: inner macro attributes are unstable
-}
-
-mod _test2_inner {
- #![empty_attr] //~ ERROR: inner macro attributes are unstable
-}
-
-#[empty_attr = "y"] //~ ERROR: key-value macro attributes are not supported
-fn _test3() {}
-
-fn attrs() {
- // Statement, item
- #[empty_attr] // OK
- struct S;
-
- // Statement, macro
- #[empty_attr] //~ ERROR: custom attributes cannot be applied to statements
- println!();
-
- // Statement, semi
- #[empty_attr] //~ ERROR: custom attributes cannot be applied to statements
- S;
-
- // Statement, local
- #[empty_attr] //~ ERROR: custom attributes cannot be applied to statements
- let _x = 2;
-
- // Expr
- let _x = #[identity_attr] 2; //~ ERROR: custom attributes cannot be applied to expressions
-
- // Opt expr
- let _x = [#[identity_attr] 2]; //~ ERROR: custom attributes cannot be applied to expressions
-
- // Expr macro
- let _x = #[identity_attr] println!();
- //~^ ERROR: custom attributes cannot be applied to expressions
-}
-
-fn test_case() {
- #![test] //~ ERROR inner macro attributes are unstable
- //~| WARN this was previously accepted
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/proc-macro-gates.stderr b/src/test/ui/proc-macro/proc-macro-gates.stderr
deleted file mode 100644
index 3feb9b829..000000000
--- a/src/test/ui/proc-macro/proc-macro-gates.stderr
+++ /dev/null
@@ -1,91 +0,0 @@
-error[E0658]: inner macro attributes are unstable
- --> $DIR/proc-macro-gates.rs:10:8
- |
-LL | #![empty_attr]
- | ^^^^^^^^^^
- |
- = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
- = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
-
-error[E0658]: inner macro attributes are unstable
- --> $DIR/proc-macro-gates.rs:14:8
- |
-LL | #![empty_attr]
- | ^^^^^^^^^^
- |
- = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
- = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
-
-error: key-value macro attributes are not supported
- --> $DIR/proc-macro-gates.rs:17:1
- |
-LL | #[empty_attr = "y"]
- | ^^^^^^^^^^^^^^^^^^^
-
-error[E0658]: custom attributes cannot be applied to statements
- --> $DIR/proc-macro-gates.rs:26:5
- |
-LL | #[empty_attr]
- | ^^^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: custom attributes cannot be applied to statements
- --> $DIR/proc-macro-gates.rs:30:5
- |
-LL | #[empty_attr]
- | ^^^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: custom attributes cannot be applied to statements
- --> $DIR/proc-macro-gates.rs:34:5
- |
-LL | #[empty_attr]
- | ^^^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: custom attributes cannot be applied to expressions
- --> $DIR/proc-macro-gates.rs:38:14
- |
-LL | let _x = #[identity_attr] 2;
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: custom attributes cannot be applied to expressions
- --> $DIR/proc-macro-gates.rs:41:15
- |
-LL | let _x = [#[identity_attr] 2];
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: custom attributes cannot be applied to expressions
- --> $DIR/proc-macro-gates.rs:44:14
- |
-LL | let _x = #[identity_attr] println!();
- | ^^^^^^^^^^^^^^^^
- |
- = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
- = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error: inner macro attributes are unstable
- --> $DIR/proc-macro-gates.rs:49:8
- |
-LL | #![test]
- | ^^^^
- |
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>
- = note: `#[deny(soft_unstable)]` on by default
-
-error: aborting due to 10 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/proc-macro/proc-macro-gates2.rs b/src/test/ui/proc-macro/proc-macro-gates2.rs
deleted file mode 100644
index 38fbd4733..000000000
--- a/src/test/ui/proc-macro/proc-macro-gates2.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// aux-build:test-macros.rs
-
-#![feature(stmt_expr_attributes)]
-
-#[macro_use]
-extern crate test_macros;
-
-// NB. these errors aren't the best errors right now, but they're definitely
-// intended to be errors. Somehow using a custom attribute in these positions
-// should either require a feature gate or not be allowed on stable.
-
-fn _test6<#[empty_attr] T>() {}
-//~^ ERROR: expected non-macro attribute, found attribute macro
-
-fn _test7() {
- match 1 {
- #[empty_attr] //~ ERROR: expected non-macro attribute, found attribute macro
- 0 => {}
- _ => {}
- }
-}
-
-fn main() {
-}
diff --git a/src/test/ui/proc-macro/proc-macro-gates2.stderr b/src/test/ui/proc-macro/proc-macro-gates2.stderr
deleted file mode 100644
index 64df34e7c..000000000
--- a/src/test/ui/proc-macro/proc-macro-gates2.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: expected non-macro attribute, found attribute macro `empty_attr`
- --> $DIR/proc-macro-gates2.rs:12:13
- |
-LL | fn _test6<#[empty_attr] T>() {}
- | ^^^^^^^^^^ not a non-macro attribute
-
-error: expected non-macro attribute, found attribute macro `empty_attr`
- --> $DIR/proc-macro-gates2.rs:17:11
- |
-LL | #[empty_attr]
- | ^^^^^^^^^^ not a non-macro attribute
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/proc-macro/pub-at-crate-root.rs b/src/test/ui/proc-macro/pub-at-crate-root.rs
deleted file mode 100644
index 54cf333a4..000000000
--- a/src/test/ui/proc-macro/pub-at-crate-root.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-pub mod a { //~ `proc-macro` crate types currently cannot export any items
- use proc_macro::TokenStream;
-
- #[proc_macro_derive(B)]
- pub fn bar(a: TokenStream) -> TokenStream {
- //~^ ERROR: must currently reside in the root of the crate
- a
- }
-}
-
-#[proc_macro_derive(B)]
-fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
-//~^ ERROR: functions tagged with `#[proc_macro_derive]` must be `pub`
- a
-}
diff --git a/src/test/ui/proc-macro/pub-at-crate-root.stderr b/src/test/ui/proc-macro/pub-at-crate-root.stderr
deleted file mode 100644
index 2e7536a0c..000000000
--- a/src/test/ui/proc-macro/pub-at-crate-root.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error: `proc-macro` crate types currently cannot export any items other than functions tagged with `#[proc_macro]`, `#[proc_macro_derive]`, or `#[proc_macro_attribute]`
- --> $DIR/pub-at-crate-root.rs:8:1
- |
-LL | pub mod a {
- | ^^^^^^^^^
-
-error: functions tagged with `#[proc_macro_derive]` must currently reside in the root of the crate
- --> $DIR/pub-at-crate-root.rs:12:5
- |
-LL | pub fn bar(a: TokenStream) -> TokenStream {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: functions tagged with `#[proc_macro_derive]` must be `pub`
- --> $DIR/pub-at-crate-root.rs:19:1
- |
-LL | fn bar(a: proc_macro::TokenStream) -> proc_macro::TokenStream {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/proc-macro/quote-debug.rs b/src/test/ui/proc-macro/quote-debug.rs
deleted file mode 100644
index e0304a014..000000000
--- a/src/test/ui/proc-macro/quote-debug.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// check-pass
-// force-host
-// no-prefer-dynamic
-// compile-flags: -Z unpretty=expanded
-//
-// This file is not actually used as a proc-macro - instead,
-// it's just used to show the output of the `quote!` macro
-
-#![feature(proc_macro_quote)]
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-
-fn main() {
- proc_macro::quote! {
- let hello = "world";
- }
-}
diff --git a/src/test/ui/proc-macro/quote-debug.stdout b/src/test/ui/proc-macro/quote-debug.stdout
deleted file mode 100644
index d2cc5c6e2..000000000
--- a/src/test/ui/proc-macro/quote-debug.stdout
+++ /dev/null
@@ -1,47 +0,0 @@
-#![feature(prelude_import)]
-#![no_std]
-// check-pass
-// force-host
-// no-prefer-dynamic
-// compile-flags: -Z unpretty=expanded
-//
-// This file is not actually used as a proc-macro - instead,
-// it's just used to show the output of the `quote!` macro
-
-#![feature(proc_macro_quote)]
-#![crate_type = "proc-macro"]
-#[prelude_import]
-use ::std::prelude::rust_2015::*;
-#[macro_use]
-extern crate std;
-
-extern crate proc_macro;
-
-fn main() {
- [crate::TokenStream::from(crate::TokenTree::Ident(crate::Ident::new("let",
- crate::Span::recover_proc_macro_span(0)))),
- crate::TokenStream::from(crate::TokenTree::Ident(crate::Ident::new("hello",
- crate::Span::recover_proc_macro_span(1)))),
- crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('=',
- crate::Spacing::Alone))),
- crate::TokenStream::from(crate::TokenTree::Literal({
- let mut iter =
- "\"world\"".parse::<crate::TokenStream>().unwrap().into_iter();
- if let (Some(crate::TokenTree::Literal(mut lit)), None) =
- (iter.next(), iter.next()) {
- lit.set_span(crate::Span::recover_proc_macro_span(2));
- lit
- } else {
- ::core::panicking::panic("internal error: entered unreachable code")
- }
- })),
- crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new(';',
- crate::Spacing::Alone)))].iter().cloned().collect::<crate::TokenStream>()
-}
-const _: () =
- {
- extern crate proc_macro;
- #[rustc_proc_macro_decls]
- #[allow(deprecated)]
- static _DECLS: &[proc_macro::bridge::client::ProcMacro] = &[];
- };
diff --git a/src/test/ui/proc-macro/raw-ident.rs b/src/test/ui/proc-macro/raw-ident.rs
deleted file mode 100644
index 03cb45714..000000000
--- a/src/test/ui/proc-macro/raw-ident.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// aux-build:raw-ident.rs
-
-#[macro_use] extern crate raw_ident;
-
-fn main() {
- make_struct!(fn);
- make_struct!(Foo);
- make_struct!(await);
-
- r#fn;
- r#Foo;
- Foo;
- r#await;
-
- make_bad_struct!(S); //~ ERROR expected one of
-}
diff --git a/src/test/ui/proc-macro/raw-ident.stderr b/src/test/ui/proc-macro/raw-ident.stderr
deleted file mode 100644
index 905a5f946..000000000
--- a/src/test/ui/proc-macro/raw-ident.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `S`
- --> $DIR/raw-ident.rs:15:5
- |
-LL | make_bad_struct!(S);
- | ^^^^^^^^^^^^^^^^^^^ expected one of 8 possible tokens
- |
- = note: this error originates in the macro `make_bad_struct` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/reserved-macro-names.rs b/src/test/ui/proc-macro/reserved-macro-names.rs
deleted file mode 100644
index c5e71a87d..000000000
--- a/src/test/ui/proc-macro/reserved-macro-names.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro_attribute]
-pub fn cfg(_: TokenStream, input: TokenStream) -> TokenStream {
- //~^ ERROR name `cfg` is reserved in attribute namespace
- input
-}
-
-#[proc_macro_attribute]
-pub fn cfg_attr(_: TokenStream, input: TokenStream) -> TokenStream {
- //~^ ERROR name `cfg_attr` is reserved in attribute namespace
- input
-}
diff --git a/src/test/ui/proc-macro/reserved-macro-names.stderr b/src/test/ui/proc-macro/reserved-macro-names.stderr
deleted file mode 100644
index 39bdd03be..000000000
--- a/src/test/ui/proc-macro/reserved-macro-names.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: name `cfg` is reserved in attribute namespace
- --> $DIR/reserved-macro-names.rs:10:8
- |
-LL | pub fn cfg(_: TokenStream, input: TokenStream) -> TokenStream {
- | ^^^
-
-error: name `cfg_attr` is reserved in attribute namespace
- --> $DIR/reserved-macro-names.rs:16:8
- |
-LL | pub fn cfg_attr(_: TokenStream, input: TokenStream) -> TokenStream {
- | ^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/proc-macro/resolve-error.rs b/src/test/ui/proc-macro/resolve-error.rs
deleted file mode 100644
index ad8a5bbb0..000000000
--- a/src/test/ui/proc-macro/resolve-error.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-// aux-build:derive-foo.rs
-// aux-build:derive-clona.rs
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate derive_foo;
-#[macro_use]
-extern crate derive_clona;
-extern crate test_macros;
-
-use test_macros::empty as bang_proc_macro;
-use test_macros::empty_attr as attr_proc_macro;
-
-macro_rules! FooWithLongNam {
- () => {}
-}
-
-macro_rules! attr_proc_mac {
- () => {}
-}
-
-#[derive(FooWithLongNan)]
-//~^ ERROR cannot find
-//~| ERROR cannot find
-struct Foo;
-
-// Interpreted as an unstable custom attribute
-#[attr_proc_macra] //~ ERROR cannot find attribute `attr_proc_macra` in this scope
-struct Bar;
-
-// Interpreted as an unstable custom attribute
-#[FooWithLongNan] //~ ERROR cannot find attribute `FooWithLongNan` in this scope
-struct Asdf;
-
-#[derive(Dlone)]
-//~^ ERROR cannot find
-//~| ERROR cannot find
-struct A;
-
-#[derive(Dlona)]
-//~^ ERROR cannot find
-//~| ERROR cannot find
-struct B;
-
-#[derive(attr_proc_macra)]
-//~^ ERROR cannot find
-//~| ERROR cannot find
-struct C;
-
-fn main() {
- FooWithLongNama!();
- //~^ ERROR cannot find
-
- attr_proc_macra!();
- //~^ ERROR cannot find
-
- Dlona!();
- //~^ ERROR cannot find
-
- bang_proc_macrp!();
- //~^ ERROR cannot find
-}
diff --git a/src/test/ui/proc-macro/resolve-error.stderr b/src/test/ui/proc-macro/resolve-error.stderr
deleted file mode 100644
index a534b9d53..000000000
--- a/src/test/ui/proc-macro/resolve-error.stderr
+++ /dev/null
@@ -1,132 +0,0 @@
-error: cannot find macro `bang_proc_macrp` in this scope
- --> $DIR/resolve-error.rs:60:5
- |
-LL | bang_proc_macrp!();
- | ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `bang_proc_macro`
- |
- ::: $DIR/auxiliary/test-macros.rs:15:1
- |
-LL | pub fn empty(_: TokenStream) -> TokenStream {
- | ------------------------------------------- similarly named macro `bang_proc_macro` defined here
-
-error: cannot find macro `Dlona` in this scope
- --> $DIR/resolve-error.rs:57:5
- |
-LL | Dlona!();
- | ^^^^^
-
-error: cannot find macro `attr_proc_macra` in this scope
- --> $DIR/resolve-error.rs:54:5
- |
-LL | macro_rules! attr_proc_mac {
- | -------------------------- similarly named macro `attr_proc_mac` defined here
-...
-LL | attr_proc_macra!();
- | ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `attr_proc_mac`
-
-error: cannot find macro `FooWithLongNama` in this scope
- --> $DIR/resolve-error.rs:51:5
- |
-LL | macro_rules! FooWithLongNam {
- | --------------------------- similarly named macro `FooWithLongNam` defined here
-...
-LL | FooWithLongNama!();
- | ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `FooWithLongNam`
-
-error: cannot find derive macro `attr_proc_macra` in this scope
- --> $DIR/resolve-error.rs:45:10
- |
-LL | #[derive(attr_proc_macra)]
- | ^^^^^^^^^^^^^^^
-
-error: cannot find derive macro `attr_proc_macra` in this scope
- --> $DIR/resolve-error.rs:45:10
- |
-LL | #[derive(attr_proc_macra)]
- | ^^^^^^^^^^^^^^^
-
-error: cannot find derive macro `Dlona` in this scope
- --> $DIR/resolve-error.rs:40:10
- |
-LL | #[derive(Dlona)]
- | ^^^^^ help: a derive macro with a similar name exists: `Clona`
- |
- ::: $DIR/auxiliary/derive-clona.rs:11:1
- |
-LL | pub fn derive_clonea(input: TokenStream) -> TokenStream {
- | ------------------------------------------------------- similarly named derive macro `Clona` defined here
-
-error: cannot find derive macro `Dlona` in this scope
- --> $DIR/resolve-error.rs:40:10
- |
-LL | #[derive(Dlona)]
- | ^^^^^ help: a derive macro with a similar name exists: `Clona`
- |
- ::: $DIR/auxiliary/derive-clona.rs:11:1
- |
-LL | pub fn derive_clonea(input: TokenStream) -> TokenStream {
- | ------------------------------------------------------- similarly named derive macro `Clona` defined here
-
-error: cannot find derive macro `Dlone` in this scope
- --> $DIR/resolve-error.rs:35:10
- |
-LL | #[derive(Dlone)]
- | ^^^^^ help: a derive macro with a similar name exists: `Clone`
- |
- ::: $SRC_DIR/core/src/clone.rs:LL:COL
- |
-LL | pub macro Clone($item:item) {
- | --------------- similarly named derive macro `Clone` defined here
-
-error: cannot find derive macro `Dlone` in this scope
- --> $DIR/resolve-error.rs:35:10
- |
-LL | #[derive(Dlone)]
- | ^^^^^ help: a derive macro with a similar name exists: `Clone`
- |
- ::: $SRC_DIR/core/src/clone.rs:LL:COL
- |
-LL | pub macro Clone($item:item) {
- | --------------- similarly named derive macro `Clone` defined here
-
-error: cannot find attribute `FooWithLongNan` in this scope
- --> $DIR/resolve-error.rs:32:3
- |
-LL | #[FooWithLongNan]
- | ^^^^^^^^^^^^^^
-
-error: cannot find attribute `attr_proc_macra` in this scope
- --> $DIR/resolve-error.rs:28:3
- |
-LL | #[attr_proc_macra]
- | ^^^^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `attr_proc_macro`
- |
- ::: $DIR/auxiliary/test-macros.rs:20:1
- |
-LL | pub fn empty_attr(_: TokenStream, _: TokenStream) -> TokenStream {
- | ---------------------------------------------------------------- similarly named attribute macro `attr_proc_macro` defined here
-
-error: cannot find derive macro `FooWithLongNan` in this scope
- --> $DIR/resolve-error.rs:22:10
- |
-LL | #[derive(FooWithLongNan)]
- | ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName`
- |
- ::: $DIR/auxiliary/derive-foo.rs:11:1
- |
-LL | pub fn derive_foo(input: TokenStream) -> TokenStream {
- | ---------------------------------------------------- similarly named derive macro `FooWithLongName` defined here
-
-error: cannot find derive macro `FooWithLongNan` in this scope
- --> $DIR/resolve-error.rs:22:10
- |
-LL | #[derive(FooWithLongNan)]
- | ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName`
- |
- ::: $DIR/auxiliary/derive-foo.rs:11:1
- |
-LL | pub fn derive_foo(input: TokenStream) -> TokenStream {
- | ---------------------------------------------------- similarly named derive macro `FooWithLongName` defined here
-
-error: aborting due to 14 previous errors
-
diff --git a/src/test/ui/proc-macro/resolved-located-at.rs b/src/test/ui/proc-macro/resolved-located-at.rs
deleted file mode 100644
index b785573f2..000000000
--- a/src/test/ui/proc-macro/resolved-located-at.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// aux-build:resolved-located-at.rs
-
-#[macro_use]
-extern crate resolved_located_at;
-
-fn main() {
- resolve_located_at!(a b)
- //~^ ERROR expected error
- //~| ERROR mismatched types
-}
diff --git a/src/test/ui/proc-macro/resolved-located-at.stderr b/src/test/ui/proc-macro/resolved-located-at.stderr
deleted file mode 100644
index 422820e9d..000000000
--- a/src/test/ui/proc-macro/resolved-located-at.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error: expected error
- --> $DIR/resolved-located-at.rs:7:25
- |
-LL | resolve_located_at!(a b)
- | ^
- |
- = note: this error originates in the macro `resolve_located_at` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0308]: mismatched types
- --> $DIR/resolved-located-at.rs:7:27
- |
-LL | fn main() {
- | - expected `()` because of default return type
-LL | resolve_located_at!(a b)
- | ^ expected `()`, found struct `S`
- |
- = note: this error originates in the macro `resolve_located_at` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/shadow.rs b/src/test/ui/proc-macro/shadow.rs
deleted file mode 100644
index 61959594c..000000000
--- a/src/test/ui/proc-macro/shadow.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-#[macro_use]
-extern crate test_macros; //~ ERROR the name `test_macros` is defined multiple times
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/shadow.stderr b/src/test/ui/proc-macro/shadow.stderr
deleted file mode 100644
index e7d95cc83..000000000
--- a/src/test/ui/proc-macro/shadow.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error[E0259]: the name `test_macros` is defined multiple times
- --> $DIR/shadow.rs:6:1
- |
-LL | extern crate test_macros;
- | ------------------------- previous import of the extern crate `test_macros` here
-LL | #[macro_use]
-LL | extern crate test_macros;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ `test_macros` reimported here
- |
- = note: `test_macros` must be defined only once in the type namespace of this module
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0259`.
diff --git a/src/test/ui/proc-macro/signature.rs b/src/test/ui/proc-macro/signature.rs
deleted file mode 100644
index 230223825..000000000
--- a/src/test/ui/proc-macro/signature.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![allow(warnings)]
-
-extern crate proc_macro;
-
-#[proc_macro_derive(A)]
-pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
- //~^ ERROR: expected a `Fn<(proc_macro::TokenStream,)>` closure, found `unsafe extern "C" fn
- loop {}
-}
diff --git a/src/test/ui/proc-macro/signature.stderr b/src/test/ui/proc-macro/signature.stderr
deleted file mode 100644
index 59b3e44c7..000000000
--- a/src/test/ui/proc-macro/signature.stderr
+++ /dev/null
@@ -1,23 +0,0 @@
-error[E0277]: expected a `Fn<(proc_macro::TokenStream,)>` closure, found `unsafe extern "C" fn(i32, u32) -> u32 {foo}`
- --> $DIR/signature.rs:10:1
- |
-LL | / pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
-LL | |
-LL | | loop {}
-LL | | }
- | | ^
- | | |
- | |_call the function in a closure: `|| unsafe { /* code */ }`
- | required by a bound introduced by this call
- |
- = help: the trait `Fn<(proc_macro::TokenStream,)>` is not implemented for fn item `unsafe extern "C" fn(i32, u32) -> u32 {foo}`
- = note: unsafe function cannot be called generically without an unsafe block
-note: required by a bound in `ProcMacro::custom_derive`
- --> $SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
- |
-LL | expand: impl Fn(crate::TokenStream) -> crate::TokenStream + Copy,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ProcMacro::custom_derive`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/proc-macro/smoke.rs b/src/test/ui/proc-macro/smoke.rs
deleted file mode 100644
index 04625559b..000000000
--- a/src/test/ui/proc-macro/smoke.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// run-pass
-
-#![allow(unused_must_use)]
-#![allow(path_statements)]
-// aux-build:derive-a.rs
-
-#[macro_use]
-extern crate derive_a;
-
-#[derive(Debug, PartialEq, A, Eq, Copy, Clone)]
-struct A;
-
-fn main() {
- A;
- assert_eq!(A, A);
- A.clone();
- let a = A;
- let _c = a;
- let _d = a;
-}
diff --git a/src/test/ui/proc-macro/span-absolute-posititions.rs b/src/test/ui/proc-macro/span-absolute-posititions.rs
deleted file mode 100644
index 6d70fe611..000000000
--- a/src/test/ui/proc-macro/span-absolute-posititions.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// aux-build:assert-span-pos.rs
-// ignore-tidy-tab
-extern crate assert_span_pos;
-
-assert_span_pos::assert_span_pos!(5, 35);
-
-// Test space indentation
- assert_span_pos::assert_span_pos!(8, 39);
-// Test tab indentation
- assert_span_pos::assert_span_pos!(10, 36);
-
-// Two tests to ensure the promise of the docs that the column is the number
-// of UTF-8 bytes instead of some other number like number of code points.
-
-// Test that multi byte UTF-8 characters indeed count as multiple bytes
-/*🌈*/assert_span_pos::assert_span_pos!(16, 40);
-// Test with a complete grapheme cluster
-/*🏳️‍🌈*/assert_span_pos::assert_span_pos!(18, 43);
-
-// Test that the macro actually emits an error on a mismatch:
-assert_span_pos::assert_span_pos!(0, 35); //~ ERROR line/column mismatch: (0, 35) != (21, 35)
-assert_span_pos::assert_span_pos!(22, 0); //~ ERROR line/column mismatch: (22, 0) != (22, 35)
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/span-absolute-posititions.stderr b/src/test/ui/proc-macro/span-absolute-posititions.stderr
deleted file mode 100644
index 6aca44a6b..000000000
--- a/src/test/ui/proc-macro/span-absolute-posititions.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: line/column mismatch: (0, 35) != (21, 35)
- --> $DIR/span-absolute-posititions.rs:21:35
- |
-LL | assert_span_pos::assert_span_pos!(0, 35);
- | ^
-
-error: line/column mismatch: (22, 0) != (22, 35)
- --> $DIR/span-absolute-posititions.rs:22:35
- |
-LL | assert_span_pos::assert_span_pos!(22, 0);
- | ^^
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/proc-macro/span-api-tests.rs b/src/test/ui/proc-macro/span-api-tests.rs
deleted file mode 100644
index 914ad54ed..000000000
--- a/src/test/ui/proc-macro/span-api-tests.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// run-pass
-// ignore-pretty
-// aux-build:span-api-tests.rs
-// aux-build:span-test-macros.rs
-
-#[macro_use]
-extern crate span_test_macros;
-
-extern crate span_api_tests;
-
-// FIXME(69775): Investigate `assert_fake_source_file`.
-
-use span_api_tests::{reemit, assert_source_file, macro_stringify};
-
-macro_rules! say_hello {
- ($macname:ident) => ( $macname! { "Hello, world!" })
-}
-
-assert_source_file! { "Hello, world!" }
-
-say_hello! { assert_source_file }
-
-reemit_legacy! {
- assert_source_file! { "Hello, world!" }
-}
-
-say_hello_extern! { assert_source_file }
-
-reemit! {
- assert_source_file! { "Hello, world!" }
-}
-
-fn main() {
- let s = macro_stringify!(Hello, world!);
- assert_eq!(s, "Hello, world!");
- assert_eq!(macro_stringify!(Hello, world!), "Hello, world!");
- assert_eq!(reemit_legacy!(macro_stringify!(Hello, world!)), "Hello, world!");
- reemit_legacy!(assert_eq!(macro_stringify!(Hello, world!), "Hello, world!"));
- // reemit change the span to be that of the call site
- assert_eq!(
- reemit!(macro_stringify!(Hello, world!)),
- "reemit!(macro_stringify!(Hello, world!))"
- );
- let r = "reemit!(assert_eq!(macro_stringify!(Hello, world!), r))";
- reemit!(assert_eq!(macro_stringify!(Hello, world!), r));
-
- assert_eq!(macro_stringify!(
- Hello,
- world!
- ), "Hello,\n world!");
-
- assert_eq!(macro_stringify!(Hello, /*world */ !), "Hello, /*world */ !");
- assert_eq!(macro_stringify!(
- Hello,
- // comment
- world!
- ), "Hello,\n // comment\n world!");
-
- assert_eq!(say_hello! { macro_stringify }, "\"Hello, world!\"");
- assert_eq!(say_hello_extern! { macro_stringify }, "\"Hello, world!\"");
-}
diff --git a/src/test/ui/proc-macro/span-from-proc-macro.rs b/src/test/ui/proc-macro/span-from-proc-macro.rs
deleted file mode 100644
index ecff2d725..000000000
--- a/src/test/ui/proc-macro/span-from-proc-macro.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// aux-build:custom-quote.rs
-// aux-build:span-from-proc-macro.rs
-// compile-flags: -Z macro-backtrace
-
-#[macro_use]
-extern crate span_from_proc_macro;
-
-#[error_from_attribute] //~ ERROR cannot find type `MissingType`
-struct ShouldBeRemoved;
-
-#[derive(ErrorFromDerive)] //~ ERROR cannot find type `OtherMissingType`
-struct Kept;
-
-fn main() {
- error_from_bang!(); //~ ERROR mismatched types
- other_error_from_bang!(); //~ ERROR cannot find value `my_ident`
-}
diff --git a/src/test/ui/proc-macro/span-from-proc-macro.stderr b/src/test/ui/proc-macro/span-from-proc-macro.stderr
deleted file mode 100644
index 7beed505a..000000000
--- a/src/test/ui/proc-macro/span-from-proc-macro.stderr
+++ /dev/null
@@ -1,62 +0,0 @@
-error[E0412]: cannot find type `MissingType` in this scope
- --> $DIR/auxiliary/span-from-proc-macro.rs:37:20
- |
-LL | pub fn error_from_attribute(_args: TokenStream, _input: TokenStream) -> TokenStream {
- | ----------------------------------------------------------------------------------- in this expansion of `#[error_from_attribute]`
-...
-LL | field: MissingType
- | ^^^^^^^^^^^ not found in this scope
- |
- ::: $DIR/span-from-proc-macro.rs:8:1
- |
-LL | #[error_from_attribute]
- | ----------------------- in this procedural macro expansion
-
-error[E0412]: cannot find type `OtherMissingType` in this scope
- --> $DIR/auxiliary/span-from-proc-macro.rs:46:21
- |
-LL | pub fn error_from_derive(_input: TokenStream) -> TokenStream {
- | ------------------------------------------------------------ in this expansion of `#[derive(ErrorFromDerive)]`
-...
-LL | Variant(OtherMissingType)
- | ^^^^^^^^^^^^^^^^ not found in this scope
- |
- ::: $DIR/span-from-proc-macro.rs:11:10
- |
-LL | #[derive(ErrorFromDerive)]
- | --------------- in this derive macro expansion
-
-error[E0425]: cannot find value `my_ident` in this scope
- --> $DIR/auxiliary/span-from-proc-macro.rs:29:9
- |
-LL | pub fn other_error_from_bang(_input: TokenStream) -> TokenStream {
- | ---------------------------------------------------------------- in this expansion of `other_error_from_bang!`
-LL | custom_quote::custom_quote! {
-LL | my_ident
- | ^^^^^^^^ not found in this scope
- |
- ::: $DIR/span-from-proc-macro.rs:16:5
- |
-LL | other_error_from_bang!();
- | ------------------------ in this macro invocation
-
-error[E0308]: mismatched types
- --> $DIR/auxiliary/span-from-proc-macro.rs:16:36
- |
-LL | let bang_error: bool = 25;
- | ---- ^^ expected `bool`, found integer
- | |
- | expected due to this
-...
-LL | pub fn error_from_bang(_input: TokenStream) -> TokenStream {
- | ---------------------------------------------------------- in this expansion of `error_from_bang!`
- |
- ::: $DIR/span-from-proc-macro.rs:15:5
- |
-LL | error_from_bang!();
- | ------------------ in this macro invocation
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0308, E0412, E0425.
-For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/span-preservation.rs b/src/test/ui/proc-macro/span-preservation.rs
deleted file mode 100644
index 0c7358655..000000000
--- a/src/test/ui/proc-macro/span-preservation.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-// For each of these, we should get the appropriate type mismatch error message,
-// and the function should be echoed.
-
-// aux-build:test-macros.rs
-
-#[macro_use]
-extern crate test_macros;
-
-#[recollect_attr]
-fn a() {
- let x: usize = "hello"; //~ ERROR mismatched types
-}
-
-#[recollect_attr]
-fn b(x: Option<isize>) -> usize {
- match x {
- Some(x) => { return x }, //~ ERROR mismatched types
- None => 10
- }
-}
-
-#[recollect_attr]
-fn c() {
- struct Foo {
- a: usize
- }
-
- struct Bar {
- a: usize,
- b: usize
- }
-
- let x = Foo { a: 10isize }; //~ ERROR mismatched types
- let y = Foo { a: 10, b: 10isize }; //~ ERROR has no field named `b`
-}
-
-#[recollect_attr]
-extern "C" fn bar() {
- 0 //~ ERROR mismatched types
-}
-
-#[recollect_attr]
-extern "C" fn baz() {
- 0 //~ ERROR mismatched types
-}
-
-#[recollect_attr]
-extern "Rust" fn rust_abi() {
- 0 //~ ERROR mismatched types
-}
-
-#[recollect_attr]
-extern "\x43" fn c_abi_escaped() {
- 0 //~ ERROR mismatched types
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr
deleted file mode 100644
index 66c68be2f..000000000
--- a/src/test/ui/proc-macro/span-preservation.stderr
+++ /dev/null
@@ -1,72 +0,0 @@
-error[E0308]: mismatched types
- --> $DIR/span-preservation.rs:11:20
- |
-LL | let x: usize = "hello";
- | ----- ^^^^^^^ expected `usize`, found `&str`
- | |
- | expected due to this
-
-error[E0308]: mismatched types
- --> $DIR/span-preservation.rs:17:29
- |
-LL | fn b(x: Option<isize>) -> usize {
- | ----- expected `usize` because of return type
-LL | match x {
-LL | Some(x) => { return x },
- | ^ expected `usize`, found `isize`
- |
-help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
- |
-LL | Some(x) => { return x.try_into().unwrap() },
- | ++++++++++++++++++++
-
-error[E0308]: mismatched types
- --> $DIR/span-preservation.rs:33:22
- |
-LL | let x = Foo { a: 10isize };
- | ^^^^^^^ expected `usize`, found `isize`
-
-error[E0560]: struct `Foo` has no field named `b`
- --> $DIR/span-preservation.rs:34:26
- |
-LL | let y = Foo { a: 10, b: 10isize };
- | ^ `Foo` does not have this field
- |
- = note: available fields are: `a`
-
-error[E0308]: mismatched types
- --> $DIR/span-preservation.rs:39:5
- |
-LL | extern "C" fn bar() {
- | - help: try adding a return type: `-> i32`
-LL | 0
- | ^ expected `()`, found integer
-
-error[E0308]: mismatched types
- --> $DIR/span-preservation.rs:44:5
- |
-LL | extern "C" fn baz() {
- | - help: try adding a return type: `-> i32`
-LL | 0
- | ^ expected `()`, found integer
-
-error[E0308]: mismatched types
- --> $DIR/span-preservation.rs:49:5
- |
-LL | extern "Rust" fn rust_abi() {
- | - help: try adding a return type: `-> i32`
-LL | 0
- | ^ expected `()`, found integer
-
-error[E0308]: mismatched types
- --> $DIR/span-preservation.rs:54:5
- |
-LL | extern "\x43" fn c_abi_escaped() {
- | - help: try adding a return type: `-> i32`
-LL | 0
- | ^ expected `()`, found integer
-
-error: aborting due to 8 previous errors
-
-Some errors have detailed explanations: E0308, E0560.
-For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/ui/proc-macro/struct-field-macro.rs b/src/test/ui/proc-macro/struct-field-macro.rs
deleted file mode 100644
index 460f4d9f7..000000000
--- a/src/test/ui/proc-macro/struct-field-macro.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// run-pass
-
-#![allow(dead_code)]
-// aux-build:derive-nothing.rs
-
-#[macro_use]
-extern crate derive_nothing;
-
-macro_rules! int {
- () => { i32 }
-}
-
-#[derive(Nothing)]
-struct S {
- x: int!(),
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/subspan.rs b/src/test/ui/proc-macro/subspan.rs
deleted file mode 100644
index a4187f9e7..000000000
--- a/src/test/ui/proc-macro/subspan.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// aux-build:subspan.rs
-
-extern crate subspan;
-
-use subspan::subspan;
-
-// This one emits no error.
-subspan!("");
-
-// Exactly one 'hi'.
-subspan!("hi"); //~ ERROR found 'hi's
-
-// Now two, back to back.
-subspan!("hihi"); //~ ERROR found 'hi's
-
-// Now three, back to back.
-subspan!("hihihi"); //~ ERROR found 'hi's
-
-// Now several, with spacing.
-subspan!("why I hide? hi!"); //~ ERROR found 'hi's
-subspan!("hey, hi, hidy, hidy, hi hi"); //~ ERROR found 'hi's
-subspan!("this is a hi, and this is another hi"); //~ ERROR found 'hi's
-subspan!("how are you this evening"); //~ ERROR found 'hi's
-subspan!("this is highly eradic"); //~ ERROR found 'hi's
-
-fn main() { }
diff --git a/src/test/ui/proc-macro/subspan.stderr b/src/test/ui/proc-macro/subspan.stderr
deleted file mode 100644
index b5dacba0e..000000000
--- a/src/test/ui/proc-macro/subspan.stderr
+++ /dev/null
@@ -1,106 +0,0 @@
-error: found 'hi's
- --> $DIR/subspan.rs:11:1
- |
-LL | subspan!("hi");
- | ^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:11:11
- |
-LL | subspan!("hi");
- | ^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: found 'hi's
- --> $DIR/subspan.rs:14:1
- |
-LL | subspan!("hihi");
- | ^^^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:14:11
- |
-LL | subspan!("hihi");
- | ^^^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: found 'hi's
- --> $DIR/subspan.rs:17:1
- |
-LL | subspan!("hihihi");
- | ^^^^^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:17:11
- |
-LL | subspan!("hihihi");
- | ^^^^^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: found 'hi's
- --> $DIR/subspan.rs:20:1
- |
-LL | subspan!("why I hide? hi!");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:20:17
- |
-LL | subspan!("why I hide? hi!");
- | ^^ ^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: found 'hi's
- --> $DIR/subspan.rs:21:1
- |
-LL | subspan!("hey, hi, hidy, hidy, hi hi");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:21:16
- |
-LL | subspan!("hey, hi, hidy, hidy, hi hi");
- | ^^ ^^ ^^ ^^ ^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: found 'hi's
- --> $DIR/subspan.rs:22:1
- |
-LL | subspan!("this is a hi, and this is another hi");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:22:12
- |
-LL | subspan!("this is a hi, and this is another hi");
- | ^^ ^^ ^^ ^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: found 'hi's
- --> $DIR/subspan.rs:23:1
- |
-LL | subspan!("how are you this evening");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:23:24
- |
-LL | subspan!("how are you this evening");
- | ^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: found 'hi's
- --> $DIR/subspan.rs:24:1
- |
-LL | subspan!("this is highly eradic");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-note: here
- --> $DIR/subspan.rs:24:12
- |
-LL | subspan!("this is highly eradic");
- | ^^ ^^
- = note: this error originates in the macro `subspan` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 8 previous errors
-
diff --git a/src/test/ui/proc-macro/test.rs b/src/test/ui/proc-macro/test.rs
deleted file mode 100644
index c96aa7317..000000000
--- a/src/test/ui/proc-macro/test.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// check-pass
-// aux-build:api/mod.rs
-
-//! This is for everything that *would* be a #[test] inside of libproc_macro,
-//! except for the fact that proc_macro objects are not capable of existing
-//! inside of an ordinary Rust test execution, only inside a macro.
-
-extern crate proc_macro_api_tests;
-
-proc_macro_api_tests::run!();
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/three-equals.rs b/src/test/ui/proc-macro/three-equals.rs
deleted file mode 100644
index 21b137c99..000000000
--- a/src/test/ui/proc-macro/three-equals.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// aux-build:three-equals.rs
-
-extern crate three_equals;
-
-use three_equals::three_equals;
-
-fn main() {
- // This one is okay.
- three_equals!(===);
-
- // Need exactly three equals.
- three_equals!(==); //~ ERROR found 2 equal signs, need exactly 3
-
- // Need exactly three equals.
- three_equals!(=====); //~ ERROR expected EOF
-
- // Only equals accepted.
- three_equals!(abc); //~ ERROR expected `=`
-
- // Only equals accepted.
- three_equals!(!!); //~ ERROR expected `=`
-
- // Only three characters expected.
- three_equals!(===a); //~ ERROR expected EOF
-}
diff --git a/src/test/ui/proc-macro/three-equals.stderr b/src/test/ui/proc-macro/three-equals.stderr
deleted file mode 100644
index 9cdb2a21b..000000000
--- a/src/test/ui/proc-macro/three-equals.stderr
+++ /dev/null
@@ -1,49 +0,0 @@
-error: found 2 equal signs, need exactly 3
- --> $DIR/three-equals.rs:12:5
- |
-LL | three_equals!(==);
- | ^^^^^^^^^^^^^^^^^
- |
- = help: input must be: `===`
- = note: this error originates in the macro `three_equals` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: expected EOF, found `=`.
- --> $DIR/three-equals.rs:15:22
- |
-LL | three_equals!(=====);
- | ^
- |
-note: last good input was here
- --> $DIR/three-equals.rs:15:21
- |
-LL | three_equals!(=====);
- | ^
- = help: input must be: `===`
-
-error: expected `=`, found `abc`.
- --> $DIR/three-equals.rs:18:19
- |
-LL | three_equals!(abc);
- | ^^^
-
-error: expected `=`, found `!`.
- --> $DIR/three-equals.rs:21:19
- |
-LL | three_equals!(!!);
- | ^
-
-error: expected EOF, found `a`.
- --> $DIR/three-equals.rs:24:22
- |
-LL | three_equals!(===a);
- | ^
- |
-note: last good input was here
- --> $DIR/three-equals.rs:24:21
- |
-LL | three_equals!(===a);
- | ^
- = help: input must be: `===`
-
-error: aborting due to 5 previous errors
-
diff --git a/src/test/ui/proc-macro/trailing-plus.rs b/src/test/ui/proc-macro/trailing-plus.rs
deleted file mode 100644
index 4f61de47d..000000000
--- a/src/test/ui/proc-macro/trailing-plus.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// check-pass
-// aux-build:test-macros.rs
-// compile-flags: -Z span-debug
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate test_macros;
-
-#[test_macros::print_attr]
-fn foo<T>() where T: Copy + {
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/trailing-plus.stdout b/src/test/ui/proc-macro/trailing-plus.stdout
deleted file mode 100644
index b90057cd6..000000000
--- a/src/test/ui/proc-macro/trailing-plus.stdout
+++ /dev/null
@@ -1,57 +0,0 @@
-PRINT-ATTR INPUT (DISPLAY): fn foo < T > () where T : Copy + {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "fn",
- span: $DIR/trailing-plus.rs:11:1: 11:3 (#0),
- },
- Ident {
- ident: "foo",
- span: $DIR/trailing-plus.rs:11:4: 11:7 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/trailing-plus.rs:11:7: 11:8 (#0),
- },
- Ident {
- ident: "T",
- span: $DIR/trailing-plus.rs:11:8: 11:9 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/trailing-plus.rs:11:9: 11:10 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [],
- span: $DIR/trailing-plus.rs:11:10: 11:12 (#0),
- },
- Ident {
- ident: "where",
- span: $DIR/trailing-plus.rs:11:13: 11:18 (#0),
- },
- Ident {
- ident: "T",
- span: $DIR/trailing-plus.rs:11:19: 11:20 (#0),
- },
- Punct {
- ch: ':',
- spacing: Alone,
- span: $DIR/trailing-plus.rs:11:20: 11:21 (#0),
- },
- Ident {
- ident: "Copy",
- span: $DIR/trailing-plus.rs:11:22: 11:26 (#0),
- },
- Punct {
- ch: '+',
- spacing: Alone,
- span: $DIR/trailing-plus.rs:11:27: 11:28 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/trailing-plus.rs:11:29: 12:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/trait-fn-args-2015.rs b/src/test/ui/proc-macro/trait-fn-args-2015.rs
deleted file mode 100644
index 6b8df78a0..000000000
--- a/src/test/ui/proc-macro/trait-fn-args-2015.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Unnamed arguments in trait functions can be passed through proc macros on 2015 edition.
-
-// check-pass
-// aux-build:test-macros.rs
-
-#![allow(anonymous_parameters)]
-
-#[macro_use]
-extern crate test_macros;
-
-trait Tr {
- #[identity_attr]
- fn method(u8);
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/two-crate-types-1.rs b/src/test/ui/proc-macro/two-crate-types-1.rs
deleted file mode 100644
index 80bfd357f..000000000
--- a/src/test/ui/proc-macro/two-crate-types-1.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// error-pattern: cannot mix `proc-macro` crate type with others
-
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![crate_type = "rlib"]
diff --git a/src/test/ui/proc-macro/two-crate-types-1.stderr b/src/test/ui/proc-macro/two-crate-types-1.stderr
deleted file mode 100644
index deaba1cf2..000000000
--- a/src/test/ui/proc-macro/two-crate-types-1.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: cannot mix `proc-macro` crate type with others
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/two-crate-types-2.rs b/src/test/ui/proc-macro/two-crate-types-2.rs
deleted file mode 100644
index 39cbf7d3b..000000000
--- a/src/test/ui/proc-macro/two-crate-types-2.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-// error-pattern: cannot mix `proc-macro` crate type with others
-// compile-flags: --crate-type rlib --crate-type proc-macro
-// force-host
diff --git a/src/test/ui/proc-macro/two-crate-types-2.stderr b/src/test/ui/proc-macro/two-crate-types-2.stderr
deleted file mode 100644
index deaba1cf2..000000000
--- a/src/test/ui/proc-macro/two-crate-types-2.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: cannot mix `proc-macro` crate type with others
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/proc-macro/unsafe-foreign-mod.rs b/src/test/ui/proc-macro/unsafe-foreign-mod.rs
deleted file mode 100644
index 7bdfa93c2..000000000
--- a/src/test/ui/proc-macro/unsafe-foreign-mod.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// run-pass
-// aux-build:macro-only-syntax.rs
-
-extern crate macro_only_syntax;
-
-#[macro_only_syntax::expect_unsafe_foreign_mod]
-unsafe extern {
- type T;
-}
-
-#[macro_only_syntax::expect_unsafe_extern_cpp_mod]
-unsafe extern "C++" {}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/unsafe-mod.rs b/src/test/ui/proc-macro/unsafe-mod.rs
deleted file mode 100644
index 8ff6e352c..000000000
--- a/src/test/ui/proc-macro/unsafe-mod.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// run-pass
-// aux-build:macro-only-syntax.rs
-
-#![feature(proc_macro_hygiene)]
-
-extern crate macro_only_syntax;
-
-#[macro_only_syntax::expect_unsafe_mod]
-unsafe mod m {
- pub unsafe mod inner;
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/visibility-path.rs b/src/test/ui/proc-macro/visibility-path.rs
deleted file mode 100644
index a73430db2..000000000
--- a/src/test/ui/proc-macro/visibility-path.rs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Proc macro defined with `pub(path)` doesn't ICEs due to resolving the `path` (issue #68921).
-
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-
-extern crate proc_macro;
-use proc_macro::*;
-
-#[proc_macro]
-pub(self) fn outer(input: TokenStream) -> TokenStream {
- //~^ ERROR functions tagged with `#[proc_macro]` must be `pub`
- input
-}
-
-mod m {
- use proc_macro::*;
-
- #[proc_macro]
- pub(super) fn inner(input: TokenStream) -> TokenStream {
- //~^ ERROR functions tagged with `#[proc_macro]` must currently reside in the root
- input
- }
-}
diff --git a/src/test/ui/proc-macro/visibility-path.stderr b/src/test/ui/proc-macro/visibility-path.stderr
deleted file mode 100644
index 1a73cc196..000000000
--- a/src/test/ui/proc-macro/visibility-path.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: functions tagged with `#[proc_macro]` must be `pub`
- --> $DIR/visibility-path.rs:12:1
- |
-LL | pub(self) fn outer(input: TokenStream) -> TokenStream {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: functions tagged with `#[proc_macro]` must currently reside in the root of the crate
- --> $DIR/visibility-path.rs:21:5
- |
-LL | pub(super) fn inner(input: TokenStream) -> TokenStream {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/proc-macro/weird-braces.rs b/src/test/ui/proc-macro/weird-braces.rs
deleted file mode 100644
index b9a7e08f9..000000000
--- a/src/test/ui/proc-macro/weird-braces.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// aux-build:test-macros.rs
-// check-pass
-// compile-flags: -Z span-debug
-
-#![feature(custom_inner_attributes)]
-
-#![no_std] // Don't load unnecessary hygiene information from std
-extern crate std;
-
-extern crate test_macros;
-use test_macros::{print_target_and_args};
-
-struct Foo<const V: bool>;
-trait Bar<const V: bool> {}
-
-#[print_target_and_args(first_outer)]
-#[print_target_and_args(second_outer)]
-impl Bar<{1 > 0}> for Foo<{true}> {
- #![print_target_and_args(first_inner)]
- #![print_target_and_args(second_inner)]
-}
-
-fn main() {}
diff --git a/src/test/ui/proc-macro/weird-braces.stdout b/src/test/ui/proc-macro/weird-braces.stdout
deleted file mode 100644
index 9bf562217..000000000
--- a/src/test/ui/proc-macro/weird-braces.stdout
+++ /dev/null
@@ -1,524 +0,0 @@
-PRINT-ATTR_ARGS INPUT (DISPLAY): first_outer
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "first_outer",
- span: $DIR/weird-braces.rs:16:25: 16:36 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second_outer)] impl Bar < { 1 > 0 } > for Foo <
-{ true } >
-{
- #! [print_target_and_args(first_inner)] #!
- [print_target_and_args(second_inner)]
-}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Punct {
- ch: '#',
- spacing: Alone,
- span: $DIR/weird-braces.rs:17:1: 17:2 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/weird-braces.rs:17:3: 17:24 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "second_outer",
- span: $DIR/weird-braces.rs:17:25: 17:37 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:17:24: 17:38 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:17:2: 17:39 (#0),
- },
- Ident {
- ident: "impl",
- span: $DIR/weird-braces.rs:18:1: 18:5 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/weird-braces.rs:18:6: 18:9 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:9: 18:10 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/weird-braces.rs:18:11: 18:12 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:13: 18:14 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/weird-braces.rs:18:15: 18:16 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:10: 18:17 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:17: 18:18 (#0),
- },
- Ident {
- ident: "for",
- span: $DIR/weird-braces.rs:18:19: 18:22 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/weird-braces.rs:18:23: 18:26 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:26: 18:27 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "true",
- span: $DIR/weird-braces.rs:18:28: 18:32 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:27: 18:33 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:33: 18:34 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/weird-braces.rs:19:5: 19:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/weird-braces.rs:19:6: 19:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/weird-braces.rs:19:8: 19:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "first_inner",
- span: $DIR/weird-braces.rs:19:30: 19:41 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:19:29: 19:42 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:19:7: 19:43 (#0),
- },
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/weird-braces.rs:20:5: 20:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/weird-braces.rs:20:6: 20:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/weird-braces.rs:20:8: 20:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "second_inner",
- span: $DIR/weird-braces.rs:20:30: 20:42 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:20:29: 20:43 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:20:7: 20:44 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:35: 21:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): second_outer
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "second_outer",
- span: $DIR/weird-braces.rs:17:25: 17:37 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
-{
- #! [print_target_and_args(first_inner)] #!
- [print_target_and_args(second_inner)]
-}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "impl",
- span: $DIR/weird-braces.rs:18:1: 18:5 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/weird-braces.rs:18:6: 18:9 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:9: 18:10 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/weird-braces.rs:18:11: 18:12 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:13: 18:14 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/weird-braces.rs:18:15: 18:16 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:10: 18:17 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:17: 18:18 (#0),
- },
- Ident {
- ident: "for",
- span: $DIR/weird-braces.rs:18:19: 18:22 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/weird-braces.rs:18:23: 18:26 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:26: 18:27 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "true",
- span: $DIR/weird-braces.rs:18:28: 18:32 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:27: 18:33 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:33: 18:34 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/weird-braces.rs:19:5: 19:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/weird-braces.rs:19:6: 19:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/weird-braces.rs:19:8: 19:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "first_inner",
- span: $DIR/weird-braces.rs:19:30: 19:41 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:19:29: 19:42 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:19:7: 19:43 (#0),
- },
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/weird-braces.rs:20:5: 20:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/weird-braces.rs:20:6: 20:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/weird-braces.rs:20:8: 20:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "second_inner",
- span: $DIR/weird-braces.rs:20:30: 20:42 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:20:29: 20:43 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:20:7: 20:44 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:35: 21:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): first_inner
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "first_inner",
- span: $DIR/weird-braces.rs:19:30: 19:41 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } >
-{ #! [print_target_and_args(second_inner)] }
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "impl",
- span: $DIR/weird-braces.rs:18:1: 18:5 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/weird-braces.rs:18:6: 18:9 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:9: 18:10 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/weird-braces.rs:18:11: 18:12 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:13: 18:14 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/weird-braces.rs:18:15: 18:16 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:10: 18:17 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:17: 18:18 (#0),
- },
- Ident {
- ident: "for",
- span: $DIR/weird-braces.rs:18:19: 18:22 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/weird-braces.rs:18:23: 18:26 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:26: 18:27 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "true",
- span: $DIR/weird-braces.rs:18:28: 18:32 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:27: 18:33 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:33: 18:34 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Punct {
- ch: '#',
- spacing: Joint,
- span: $DIR/weird-braces.rs:20:5: 20:6 (#0),
- },
- Punct {
- ch: '!',
- spacing: Alone,
- span: $DIR/weird-braces.rs:20:6: 20:7 (#0),
- },
- Group {
- delimiter: Bracket,
- stream: TokenStream [
- Ident {
- ident: "print_target_and_args",
- span: $DIR/weird-braces.rs:20:8: 20:29 (#0),
- },
- Group {
- delimiter: Parenthesis,
- stream: TokenStream [
- Ident {
- ident: "second_inner",
- span: $DIR/weird-braces.rs:20:30: 20:42 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:20:29: 20:43 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:20:7: 20:44 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:35: 21:2 (#0),
- },
-]
-PRINT-ATTR_ARGS INPUT (DISPLAY): second_inner
-PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
- Ident {
- ident: "second_inner",
- span: $DIR/weird-braces.rs:20:30: 20:42 (#0),
- },
-]
-PRINT-ATTR INPUT (DISPLAY): impl Bar < { 1 > 0 } > for Foo < { true } > {}
-PRINT-ATTR INPUT (DEBUG): TokenStream [
- Ident {
- ident: "impl",
- span: $DIR/weird-braces.rs:18:1: 18:5 (#0),
- },
- Ident {
- ident: "Bar",
- span: $DIR/weird-braces.rs:18:6: 18:9 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:9: 18:10 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Literal {
- kind: Integer,
- symbol: "1",
- suffix: None,
- span: $DIR/weird-braces.rs:18:11: 18:12 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:13: 18:14 (#0),
- },
- Literal {
- kind: Integer,
- symbol: "0",
- suffix: None,
- span: $DIR/weird-braces.rs:18:15: 18:16 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:10: 18:17 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:17: 18:18 (#0),
- },
- Ident {
- ident: "for",
- span: $DIR/weird-braces.rs:18:19: 18:22 (#0),
- },
- Ident {
- ident: "Foo",
- span: $DIR/weird-braces.rs:18:23: 18:26 (#0),
- },
- Punct {
- ch: '<',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:26: 18:27 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [
- Ident {
- ident: "true",
- span: $DIR/weird-braces.rs:18:28: 18:32 (#0),
- },
- ],
- span: $DIR/weird-braces.rs:18:27: 18:33 (#0),
- },
- Punct {
- ch: '>',
- spacing: Alone,
- span: $DIR/weird-braces.rs:18:33: 18:34 (#0),
- },
- Group {
- delimiter: Brace,
- stream: TokenStream [],
- span: $DIR/weird-braces.rs:18:35: 21:2 (#0),
- },
-]
diff --git a/src/test/ui/proc-macro/weird-hygiene.rs b/src/test/ui/proc-macro/weird-hygiene.rs
deleted file mode 100644
index 7ba3f98a7..000000000
--- a/src/test/ui/proc-macro/weird-hygiene.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// aux-build:weird-hygiene.rs
-
-#![feature(stmt_expr_attributes)]
-#![feature(proc_macro_hygiene)]
-
-extern crate weird_hygiene;
-use weird_hygiene::*;
-
-macro_rules! other {
- ($tokens:expr) => {
- macro_rules! call_it {
- ($outer_ident:ident) => {
- macro_rules! inner {
- () => {
- $outer_ident;
- }
- }
- }
- }
-
- #[derive(WeirdDerive)]
- enum MyEnum {
- Value = (stringify!($tokens + hidden_ident), 1).1 //~ ERROR cannot find
- }
-
- inner!();
- }
-}
-
-macro_rules! invoke_it {
- ($token:expr) => {
- #[recollect_attr] {
- $token;
- hidden_ident //~ ERROR cannot find
- }
- }
-}
-
-fn main() {
- // `other` and `invoke_it` are both macro_rules! macros,
- // so it should be impossible for them to ever see `hidden_ident`,
- // even if they invoke a proc macro.
- let hidden_ident = "Hello1";
- other!(50);
- invoke_it!(25);
-}
diff --git a/src/test/ui/proc-macro/weird-hygiene.stderr b/src/test/ui/proc-macro/weird-hygiene.stderr
deleted file mode 100644
index 256e68e89..000000000
--- a/src/test/ui/proc-macro/weird-hygiene.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error[E0425]: cannot find value `hidden_ident` in this scope
- --> $DIR/weird-hygiene.rs:23:43
- |
-LL | Value = (stringify!($tokens + hidden_ident), 1).1
- | ^^^^^^^^^^^^ not found in this scope
-...
-LL | other!(50);
- | ---------- in this macro invocation
- |
- = note: this error originates in the macro `inner` which comes from the expansion of the macro `other` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error[E0425]: cannot find value `hidden_ident` in this scope
- --> $DIR/weird-hygiene.rs:34:13
- |
-LL | hidden_ident
- | ^^^^^^^^^^^^ not found in this scope
-...
-LL | invoke_it!(25);
- | -------------- in this macro invocation
- |
- = note: this error originates in the macro `invoke_it` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0425`.