rust/tests/ui/proc-macro
Guillaume Gomez 54d6bded30
Rollup merge of #118802 - ehuss:remove-edition-preview, r=TaKO8Ki
Remove edition umbrella features.

In the 2018 edition, there was an "umbrella" feature `#[feature(rust_2018_preview)]` which was used to enable several other features at once. This umbrella mechanism was not used in the 2021 edition and likely will not be used in 2024 either. During 2018 users reported that setting the feature was awkward, especially since they already needed to opt-in via the edition mechanism.

This PR removes this mechanism because I believe it will not be used (and will clean up and simplify the code). I believe that there are better ways to handle features and editions. In short:

- For highly experimental features, that may or may not be involved in an edition, they can implement regular feature gates like `tcx.features().my_feature`.
- For experimental features that *might* be involved in an edition, they should implement gates with `tcx.features().my_feature && span.at_least_rust_20xx()`. This requires the user to still specify `#![feature(my_feature)]`, to avoid disrupting testing of other edition features which are ready and have been accepted within the edition.
- For experimental features that have graduated to definitely be part of an edition, they should implement gates with `tcx.features().my_feature || span.at_least_rust_20xx()`, or just remove the feature check altogether and just check `span.at_least_rust_20xx()`.
- For relatively simple changes, they can skip the whole feature gating thing and just check `span.at_least_rust_20xx()`, and rely on the instability of the edition itself (which requires `-Zunstable-options`) to gate it.

I am working on documenting all of this in the rustc-dev-guide.
2023-12-11 11:40:36 +01:00
..
auxiliary Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
debug
outer
pretty-print-hack
add-impl.rs
allowed-attr-stmt-expr.rs
allowed-attr-stmt-expr.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
allowed-signatures.rs
ambiguous-builtin-attrs-test.rs
ambiguous-builtin-attrs-test.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
ambiguous-builtin-attrs.rs
ambiguous-builtin-attrs.stderr
amputate-span.fixed
amputate-span.rs
amputate-span.stderr
append-impl.rs
attr-args.rs
attr-cfg.rs
attr-complex-fn.rs
attr-complex-fn.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
attr-invalid-exprs.rs
attr-invalid-exprs.stderr
attr-on-trait.rs
attr-stmt-expr-rpass.rs
attr-stmt-expr.rs
attr-stmt-expr.stderr
attr-stmt-expr.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
attribute-after-derive.rs
attribute-after-derive.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
attribute-spans-preserved.rs
attribute-spans-preserved.stderr
attribute-spans-preserved.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
attribute-with-error.rs
attribute-with-error.stderr
attribute.rs
attribute.stderr
attributes-included.rs
attributes-included.stderr
attributes-on-definitions.rs
attributes-on-definitions.stderr
attributes-on-modules-fail.rs
attributes-on-modules-fail.stderr
attributes-on-modules.rs
bad-projection.rs Work around the fact that check_mod_type_wf may spuriously return ErrorGuaranteed, even if that error is only emitted by check_modwitem_types 2023-10-25 12:04:54 +00:00
bad-projection.stderr Work around the fact that check_mod_type_wf may spuriously return ErrorGuaranteed, even if that error is only emitted by check_modwitem_types 2023-10-25 12:04:54 +00:00
bang-macro.rs
break-token-spans.rs
break-token-spans.stderr
call-deprecated.rs
call-deprecated.stderr
call-site.rs
capture-macro-rules-invoke.rs
capture-macro-rules-invoke.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
capture-unglued-token.rs
capture-unglued-token.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
cfg-eval-fail.rs
cfg-eval-fail.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cfg-eval-inner.rs
cfg-eval-inner.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
cfg-eval.rs
cfg-eval.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
count_compound_ops.rs
crate-attrs-multiple.rs
crate-var.rs
crt-static.rs
custom-attr-only-one-derive.rs Remove edition umbrella features. 2023-12-10 13:03:28 -08:00
define-two.rs
define-two.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
derive-attr-cfg.rs
derive-b.rs
derive-bad.rs
derive-bad.stderr
derive-expand-order.rs
derive-expand-order.stdout
derive-helper-configured.rs
derive-helper-legacy-limits.rs
derive-helper-legacy-limits.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
derive-helper-legacy-spurious.rs
derive-helper-legacy-spurious.stderr
derive-helper-shadowed.rs
derive-helper-shadowing-2.rs
derive-helper-shadowing.rs
derive-helper-shadowing.stderr
derive-helper-vs-legacy.rs
derive-in-mod.rs
derive-multiple-with-packed.rs
derive-same-struct.rs
derive-same-struct.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
derive-still-gated.rs
derive-still-gated.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
derive-test.rs
derive-two-attrs.rs
derive-union.rs
disappearing-resolution.rs
disappearing-resolution.stderr Structured use suggestion on privacy error 2023-12-04 22:26:08 +00:00
doc-comment-preserved.rs
doc-comment-preserved.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
dollar-crate-issue-57089.rs
dollar-crate-issue-57089.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
dollar-crate-issue-62325.rs
dollar-crate-issue-62325.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
dollar-crate-issue-101211.rs
dollar-crate.rs
dollar-crate.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
edition-gated-async-move-syntax-issue89699.rs test: Add test for async-move in 2015 Rust proc macro 2023-11-20 13:15:08 +01:00
edition-gated-async-move-syntax-issue89699.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
edition-imports-2018.rs
empty-crate.rs
empty-where-clause.rs
empty-where-clause.stderr
expand-expr.rs
expand-expr.stderr
expand-to-derive.rs
expand-to-derive.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
expand-to-unstable.rs
expand-to-unstable.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
expand-with-a-macro.rs
export-macro.rs
export-macro.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
exports.rs
exports.stderr
expr-stmt-nonterminal-tokens.rs
expr-stmt-nonterminal-tokens.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
extern-prelude-extern-crate-proc-macro.rs
gen-lifetime-token.rs
gen-macro-rules-hygiene.rs
gen-macro-rules-hygiene.stderr
gen-macro-rules.rs
generate-dollar-ident.rs
generate-mod.rs
generate-mod.stderr
helper-attr-blocked-by-import-ambig.rs
helper-attr-blocked-by-import-ambig.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
helper-attr-blocked-by-import.rs
hygiene_example.rs
illegal-proc-macro-derive-use.rs
illegal-proc-macro-derive-use.stderr
import.rs
import.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
inert-attribute-order.rs
inert-attribute-order.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
inner-attr-non-inline-mod.rs
inner-attr-non-inline-mod.stderr
inner-attr-non-inline-mod.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
inner-attrs.rs
inner-attrs.stderr
inner-attrs.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
input-interpolated.rs
input-interpolated.stdout
invalid-attributes.rs
invalid-attributes.stderr
invalid-punct-ident-1.rs
invalid-punct-ident-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
invalid-punct-ident-2.rs
invalid-punct-ident-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
invalid-punct-ident-3.rs
invalid-punct-ident-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
invalid-punct-ident-4.rs
invalid-punct-ident-4.stderr
is-available.rs
issue-36935.rs
issue-36935.stderr
issue-37788.rs
issue-37788.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-38586.rs
issue-38586.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-39889.rs
issue-42708.rs
issue-50061.rs
issue-50493.rs
issue-50493.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-53481.rs
issue-59191-replace-root-with-fn.rs
issue-59191-replace-root-with-fn.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-66286.rs
issue-66286.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73933-procedural-masquerade.rs
issue-73933-procedural-masquerade.stdout
issue-75734-pp-paren.rs
issue-75734-pp-paren.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
issue-75801.rs
issue-75801.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-75930-derive-cfg.rs Add a comment to tests/ui/proc-macro/issue-75930-derive-cfg.rs. 2023-10-12 08:46:15 +11:00
issue-75930-derive-cfg.stderr Add a comment to tests/ui/proc-macro/issue-75930-derive-cfg.rs. 2023-10-12 08:46:15 +11:00
issue-75930-derive-cfg.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
issue-76182-leading-vert-pat.rs
issue-76182-leading-vert-pat.stdout
issue-76270-panic-in-libproc-macro.rs
issue-76270-panic-in-libproc-macro.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-78675-captured-inner-attrs.rs
issue-78675-captured-inner-attrs.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
issue-79148.rs
issue-79148.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-79242-slow-retokenize-check.rs
issue-79825.rs
issue-80760-empty-stmt.rs
issue-80760-empty-stmt.stdout
issue-81007-item-attrs.rs
issue-81007-item-attrs.stdout
issue-81543-item-parse-err.rs
issue-81543-item-parse-err.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-81555.rs
issue-83469-global-alloc-invalid-stmt.rs
issue-83469-global-alloc-invalid-stmt.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-83510.rs
issue-83510.stderr
issue-86781-bad-inner-doc.fixed
issue-86781-bad-inner-doc.rs
issue-86781-bad-inner-doc.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-91800.rs
issue-91800.stderr
issue-104884-trait-impl-sugg-err.rs
issue-104884-trait-impl-sugg-err.stderr
issue-107113-wrap.rs
issue-107113-wrap.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
item-error.rs
item-error.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
keep-expr-tokens.rs
keep-expr-tokens.stderr
keep-expr-tokens.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
lifetimes-rpass.rs
lifetimes.rs
lifetimes.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
lints_in_proc_macros.rs
lints_in_proc_macros.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
literal-to-string.rs Stabilize C string literals 2023-11-01 09:16:34 +09:00
literal-to-string.stdout Stabilize C string literals 2023-11-01 09:16:34 +09:00
load-panic-backtrace.rs
load-panic-backtrace.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
load-panic.rs
load-panic.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
load-two.rs
macro-brackets.rs
macro-brackets.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
macro-crate-multi-decorator.rs
macro-namespace-reserved-2.rs
macro-namespace-reserved-2.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
macro-namespace-reserved.rs
macro-namespace-reserved.stderr
macro-quote-cond.rs
macro-rules-derive-cfg.rs
macro-rules-derive-cfg.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
macro-rules-derive.rs
macro-rules-derive.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
macro-use-attr.rs
macro-use-bang.rs
macros-in-extern-derive.rs
macros-in-extern-derive.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
macros-in-extern.rs
macros-in-type.rs
meta-delim.rs
meta-macro-hygiene.rs
meta-macro-hygiene.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
meta-macro.rs
meta-macro.stdout
mixed-site-span.rs
mixed-site-span.stderr
modify-ast.rs
module_with_attrs.rs
module.rs
multispan.rs
multispan.stderr
negative-token.rs
nested-derive-cfg.rs
nested-derive-cfg.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
nested-item-spans.rs
nested-item-spans.stderr
nested-macro-rules.rs
nested-macro-rules.stdout
nested-nonterminal-tokens.rs
nested-nonterminal-tokens.stdout
no-macro-use-attr.rs
no-macro-use-attr.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
no-mangle-in-proc-macro-issue-111888.rs
no-missing-docs.rs
nodelim-groups.rs
nodelim-groups.stdout
non-root.rs
non-root.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
nonterminal-expansion.rs
nonterminal-expansion.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
nonterminal-recollect-attr.rs
nonterminal-recollect-attr.stdout
nonterminal-token-hygiene.rs
nonterminal-token-hygiene.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
not-joint.rs
out-of-line-mod.rs
panic-abort.rs
panic-abort.stderr
parent-source-spans.rs
parent-source-spans.stderr
pretty-print-hack-hide.rs
pretty-print-hack-hide.stdout
pretty-print-hack-show.local.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
pretty-print-hack-show.local.stdout
pretty-print-hack-show.remapped.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
pretty-print-hack-show.remapped.stdout
pretty-print-hack-show.rs
pretty-print-tts.rs
pretty-print-tts.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
proc-macro-abi.rs
proc-macro-abi.stderr
proc-macro-attributes.rs
proc-macro-attributes.stderr
proc-macro-deprecated-attr.rs
proc-macro-gates2.rs
proc-macro-gates2.stderr
proc-macro-gates.rs
proc-macro-gates.stderr
pub-at-crate-root.rs
pub-at-crate-root.stderr
quote-debug.rs
quote-debug.stdout
raw-ident.rs
raw-ident.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
reserved-macro-names.rs
reserved-macro-names.stderr
resolve-error.rs
resolve-error.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
resolved-located-at.rs
resolved-located-at.stderr Point to where missing return type should go 2023-10-04 21:09:54 +00:00
shadow.rs
shadow.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
signature-proc-macro-attribute.rs
signature-proc-macro-attribute.stderr
signature-proc-macro-derive.rs
signature-proc-macro-derive.stderr
signature-proc-macro.rs
signature-proc-macro.stderr
signature.rs
signature.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
smoke.rs
span-absolute-posititions.rs
span-absolute-posititions.stderr
span-api-tests.rs
span-from-proc-macro.rs
span-from-proc-macro.stderr
span-preservation.rs
span-preservation.stderr Point to where missing return type should go 2023-10-04 21:09:54 +00:00
struct-field-macro.rs
subspan.rs
subspan.stderr
test-same-crate.rs
test-same-crate.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
test.rs
three-equals.rs
three-equals.stderr
trailing-plus.rs
trailing-plus.stdout Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
trait-fn-args-2015.rs
two-crate-types-1.rs
two-crate-types-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
two-crate-types-2.rs
two-crate-types-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unsafe-foreign-mod.rs
unsafe-mod.rs
visibility-path.rs
visibility-path.stderr
weird-braces.rs
weird-braces.stdout Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
weird-hygiene.rs
weird-hygiene.stderr