rust/compiler/rustc_builtin_macros/src
bors a0648eab36 Auto merge of #88835 - FabianWolff:issue-88770, r=petrochenkov
Fix error recovery in format macro parsing

Fixes #88770. Basically, the assumption in the following comment is incorrect:
b69fe57261/compiler/rustc_builtin_macros/src/format.rs (L167-L172)

This is only true in the first iteration of the loop, when [`p.clear_expected_tokens()`](b69fe57261/compiler/rustc_builtin_macros/src/format.rs (L164)) is called. In subsequent iterations, `p.expected_tokens` won't be empty, so `p.expect()` won't actually call `unexpected_try_recover()`:
b69fe57261/compiler/rustc_parse/src/parser/mod.rs (L487-L498)

Instead, it will call `expect_one_of()`, which _can_ recover and return `Ok()`. This PR handles this case to fix the ICE in #88770.
2021-09-24 11:54:29 +00:00
..
deriving Introduce a fast path that avoids the debug_tuple abstraction when deriving 2021-09-10 12:07:03 -07:00
format_foreign mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
asm.rs Rollup merge of #88209 - Amanieu:asm_in_underscore, r=nagisa 2021-09-11 08:23:40 -07:00
assert.rs Fix bug with assert!() calling the wrong edition of panic!(). 2021-02-01 23:23:27 +01:00
cfg_accessible.rs expand: Tell built-in macros whether we are currently in forced expansion mode 2020-11-19 19:25:20 +03:00
cfg_eval.rs cfg_eval: Replace multiple unwraps with a single unwrap 2021-06-20 18:54:45 +03:00
cfg.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
cmdline_attrs.rs Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
compile_error.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
concat_idents.rs expand: Stop un-interpolating NtIdents before passing them to built-in macros 2020-09-28 23:10:44 +03:00
concat.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
derive.rs Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
env.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
format_foreign.rs avoid full-slicing slices 2021-02-16 00:31:11 +01:00
format.rs Auto merge of #88835 - FabianWolff:issue-88770, r=petrochenkov 2021-09-24 11:54:29 +00:00
global_allocator.rs Remove box syntax from rustc_builtin_macros 2021-08-18 09:25:26 +02:00
lib.rs Remove box syntax from rustc_builtin_macros 2021-08-18 09:25:26 +02:00
llvm_asm.rs Rollup merge of #80495 - jyn514:rename-empty, r=petrochenkov 2020-12-30 20:56:58 +00:00
log_syntax.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
panic.rs Implement new panic!() behaviour for Rust 2021. 2021-01-25 13:48:11 +01:00
proc_macro_harness.rs Compute proc_macros in resolutions. 2021-09-01 20:13:16 +02:00
source_util.rs Compute a better lint_node_id during expansion 2021-07-17 23:03:56 -05:00
standard_library_imports.rs Use LocalExpnId where possible. 2021-07-17 19:41:02 +02:00
test_harness.rs Remove Session.used_attrs and move logic to CheckAttrVisitor 2021-08-21 13:27:27 -05:00
test.rs proof of concept add test type on prints 2021-05-03 15:22:19 +02:00
trace_macros.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
util.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00