rust/compiler
Michael Howell 14b27cfd11
Rollup merge of #100250 - cjgillot:recover-token-stream, r=Aaron1011
Manually cleanup token stream when macro expansion aborts.

In case of syntax error in macro expansion, the expansion code can decide to stop processing anything. In that case, the token stream is malformed. This makes downstream users, like derive macros, ICE.

In this case, this PR manually cleans up the token stream by closing all currently open delimiters.

Fixes https://github.com/rust-lang/rust/issues/96818.
Fixes https://github.com/rust-lang/rust/issues/80447.
Fixes https://github.com/rust-lang/rust/issues/81920.
Fixes https://github.com/rust-lang/rust/issues/91023.
2022-09-20 10:12:56 -07:00
..
rustc Don't rerun the build script for the compiler each time on linux 2022-07-10 23:57:25 -05:00
rustc_apfloat Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
rustc_arena Make use of [wrapping_]byte_{add,sub} 2022-08-23 19:32:37 +04:00
rustc_ast Rollup merge of #93628 - est31:stabilize_let_else, r=joshtriplett 2022-09-17 15:31:06 +05:30
rustc_ast_lowering Rollup merge of #93628 - est31:stabilize_let_else, r=joshtriplett 2022-09-17 15:31:06 +05:30
rustc_ast_passes Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_ast_pretty make mk_attr_id part of ParseSess 2022-09-14 08:49:10 +08:00
rustc_attr Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_borrowck Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank 2022-09-20 12:09:52 +00:00
rustc_builtin_macros Rollup merge of #100250 - cjgillot:recover-token-stream, r=Aaron1011 2022-09-20 10:12:56 -07:00
rustc_codegen_cranelift Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank 2022-09-20 12:09:52 +00:00
rustc_codegen_gcc Remove dead broken code from const zst handling in backends 2022-09-06 14:09:49 +00:00
rustc_codegen_llvm Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk 2022-09-17 15:31:07 +05:30
rustc_codegen_ssa Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank 2022-09-20 12:09:52 +00:00
rustc_const_eval Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank 2022-09-20 12:09:52 +00:00
rustc_data_structures Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_driver Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_error_codes Stabilize #![feature(label_break_value)] 2022-08-23 21:14:12 -05:00
rustc_error_messages Auto merge of #101924 - jackh726:revert-static-hrtb-error, r=compiler-errors 2022-09-19 04:56:14 +00:00
rustc_errors Rollup merge of #101790 - TaKO8Ki:do-not-suggest-placeholder-to-const-and-static-without-type, r=compiler-errors 2022-09-17 15:31:08 +05:30
rustc_expand Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_feature Rollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkov 2022-09-17 23:30:49 +02:00
rustc_fs_util Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
rustc_graphviz Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
rustc_hir Rollup merge of #93628 - est31:stabilize_let_else, r=joshtriplett 2022-09-17 15:31:06 +05:30
rustc_hir_pretty Handle generic parameters. 2022-09-09 01:31:46 +00:00
rustc_incremental Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_index Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_infer remove the Subst trait, always use EarlyBinder 2022-09-19 11:37:27 +02:00
rustc_interface Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_lexer remove unnecessary PartialOrd and Ord 2022-09-08 06:15:33 +09:00
rustc_lint Rollup merge of #101912 - crlf0710:compiler_update_unicode_15, r=Manishearth 2022-09-18 02:55:29 +02:00
rustc_lint_defs Compute lint_levels by definition 2022-09-14 19:02:44 +02:00
rustc_llvm Introduce a fallible variant of LLVMConstIntGetZExtValue 2022-09-09 15:54:14 +02:00
rustc_log Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
rustc_macros Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_metadata Auto merge of #101806 - BelovDV:issue-fix-fn-find_library, r=petrochenkov 2022-09-20 07:10:18 +00:00
rustc_middle Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank 2022-09-20 12:09:52 +00:00
rustc_mir_build Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank 2022-09-20 12:09:52 +00:00
rustc_mir_dataflow Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank 2022-09-20 12:09:52 +00:00
rustc_mir_transform remove the Subst trait, always use EarlyBinder 2022-09-19 11:37:27 +02:00
rustc_monomorphize Rollup merge of #93628 - est31:stabilize_let_else, r=joshtriplett 2022-09-17 15:31:06 +05:30
rustc_parse Rollup merge of #100250 - cjgillot:recover-token-stream, r=Aaron1011 2022-09-20 10:12:56 -07:00
rustc_parse_format Separate CountIsStar from CountIsParam in rustc_parse_format. 2022-08-25 14:49:09 +02:00
rustc_passes Rollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkov 2022-09-17 23:30:49 +02:00
rustc_plugin_impl Migrate rustc_plugin_impl to SessionDiagnostic 2022-08-22 16:35:05 +01:00
rustc_privacy Rollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkov 2022-09-17 23:30:49 +02:00
rustc_query_impl Rollup merge of #101801 - SparrowLii:query_depth_note, r=estebank 2022-09-17 19:27:06 +02:00
rustc_query_system Rollup merge of #101801 - SparrowLii:query_depth_note, r=estebank 2022-09-17 19:27:06 +02:00
rustc_resolve Rollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkov 2022-09-17 23:30:49 +02:00
rustc_save_analysis Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_serialize Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_session Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
rustc_smir Only keep one version of ImplicitSelfKind. 2022-09-13 19:18:23 +02:00
rustc_span Rollup merge of #101713 - Bryanskiy:AccessLevels, r=petrochenkov 2022-09-17 23:30:49 +02:00
rustc_symbol_mangling remove the Subst trait, always use EarlyBinder 2022-09-19 11:37:27 +02:00
rustc_target Rollup merge of #93628 - est31:stabilize_let_else, r=joshtriplett 2022-09-17 15:31:06 +05:30
rustc_trait_selection Auto merge of #101901 - lcnr:early-binder-type-foldable, r=compiler-errors 2022-09-19 10:35:09 +00:00
rustc_traits remove the Subst trait, always use EarlyBinder 2022-09-19 11:37:27 +02:00
rustc_transmute Auto merge of #100726 - jswrenn:transmute, r=oli-obk 2022-09-04 07:55:44 +00:00
rustc_ty_utils remove the Subst trait, always use EarlyBinder 2022-09-19 11:37:27 +02:00
rustc_type_ir Address code review comments 2022-09-13 14:50:12 -07:00
rustc_typeck Rollup merge of #101904 - Rageking8:fix-101712, r=oli-obk 2022-09-19 17:55:20 +02:00