rust/compiler
Dylan DPC 1115accccc
Rollup merge of #83548 - Aaron1011:capture-none-delims, r=petrochenkov
Always preserve `None`-delimited groups in a captured `TokenStream`

Previously, we would silently remove any `None`-delimiters when
capturing a `TokenStream`, 'flattenting' them to their inner tokens.
This was not normally visible, since we usually have
`TokenKind::Interpolated` (which gets converted to a `None`-delimited
group during macro invocation) instead of an actual `None`-delimited
group.

However, there are a couple of cases where this becomes visible to
proc-macros:
1. A cross-crate `macro_rules!` macro has a `None`-delimited group
   stored in its body (as a result of being produced by another
   `macro_rules!` macro). The cross-crate `macro_rules!` invocation
   can then expand to an attribute macro invocation, which needs
   to be able to see the `None`-delimited group.
2. A proc-macro can invoke an attribute proc-macro with its re-collected
   input. If there are any nonterminals present in the input, they will
   get re-collected to `None`-delimited groups, which will then get
   captured as part of the attribute macro invocation.

Both of these cases are incredibly obscure, so there hopefully won't be
any breakage. This change will allow more agressive 'flattenting' of
nonterminals in #82608 without losing `None`-delimited groups.
2021-03-27 20:37:12 +01:00
..
rustc Rollup merge of #82642 - sfackler:jemalloc-zone, r=pnkfelix 2021-03-08 13:13:22 +01:00
rustc_apfloat Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_arena Rollup merge of #83197 - jyn514:cfg-test-dead-code, r=joshtriplett 2021-03-19 15:03:24 +01:00
rustc_ast Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_ast_lowering Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_ast_passes progress, stuff compiles now 2021-03-23 17:16:20 +00:00
rustc_ast_pretty Update with comments 2021-03-23 17:16:20 +00:00
rustc_attr stabilize or_patterns 2021-03-19 19:45:32 -05:00
rustc_builtin_macros Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_codegen_cranelift update const_eval_resolve 2021-03-20 17:22:24 +01:00
rustc_codegen_llvm Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_codegen_ssa Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_data_structures Auto merge of #83465 - michaelwoerister:safe-read_raw_bytes, r=cjgillot 2021-03-26 01:28:59 +00:00
rustc_driver Auto merge of #83050 - osa1:issue83048, r=matthewjasper 2021-03-24 12:02:13 +00:00
rustc_error_codes progress, stuff compiles now 2021-03-23 17:16:20 +00:00
rustc_errors Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_expand Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_feature Rollup merge of #83384 - mark-i-m:rename-pat2018, r=joshtriplett 2021-03-23 10:15:43 +09:00
rustc_fs_util
rustc_graphviz
rustc_hir progress, stuff compiles now 2021-03-23 17:16:20 +00:00
rustc_hir_pretty Add has_default to GenericParamDefKind::Const 2021-03-23 17:16:20 +00:00
rustc_incremental Only enable assert_dep_graph when query-dep-graph is enabled. 2021-03-22 19:22:06 +01:00
rustc_index Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_infer Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_interface Auto merge of #83307 - richkadel:cov-unused-functions-1.1, r=tmandry 2021-03-25 05:07:34 +00:00
rustc_lexer
rustc_lint Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_lint_defs make unaligned_refereces future-incompat lint warn-by-default, and remove the safe_packed_borrows lint that it replaces 2021-03-27 16:59:37 +01:00
rustc_llvm Auto merge of #83387 - cuviper:min-llvm-10, r=nagisa 2021-03-25 13:11:18 +00:00
rustc_macros Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_metadata Fix #83045 by moving some crate loading verification code to a better place. 2021-03-26 09:59:10 +01:00
rustc_middle Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_mir Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_mir_build Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_parse Always preserve None-delimited groups in a captured TokenStream 2021-03-26 23:32:18 -04:00
rustc_parse_format Rollup merge of #83348 - osa1:issue83344, r=jackh726 2021-03-28 01:33:13 +09:00
rustc_passes Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_plugin_impl Remove hir::Item::attrs. 2021-03-09 19:27:50 +01:00
rustc_privacy Update with comments 2021-03-23 17:16:20 +00:00
rustc_query_impl Auto merge of #82936 - oli-obk:valtree, r=RalfJung,lcnr,matthewjasper 2021-03-16 22:42:56 +00:00
rustc_query_system Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_resolve Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_save_analysis Auto merge of #83424 - cjgillot:noparam, r=lcnr 2021-03-25 16:35:19 +00:00
rustc_serialize Auto merge of #83465 - michaelwoerister:safe-read_raw_bytes, r=cjgillot 2021-03-26 01:28:59 +00:00
rustc_session Rollup merge of #83437 - Amanieu:asm_syntax, r=petrochenkov 2021-03-26 02:34:39 +01:00
rustc_span Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_symbol_mangling stabilize or_patterns 2021-03-19 19:45:32 -05:00
rustc_target Allow not emitting uwtable on Android 2021-03-23 04:39:58 +08:00
rustc_trait_selection Rollup merge of #82917 - cuviper:iter-zip, r=m-ou-se 2021-03-27 20:37:07 +01:00
rustc_traits Add has_default to GenericParamDefKind::Const 2021-03-23 17:16:20 +00:00
rustc_ty_utils Don't consider !Unpin references as noalias 2021-03-21 20:10:53 +01:00
rustc_type_ir New pass to deduplicate blocks 2021-02-21 21:51:54 +01:00
rustc_typeck Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00