2646663b5a
This works by adding a boolean flag, `continue_after_error`, to `syntax::errors::Handler` that can be imperatively set to `true` or `false` via a new `fn set_continue_after_error`. The flag starts off true (since we generally try to recover from compiler errors, and `Handler` is shared across all phases). Then, during the `phase_1_parse_input`, we consult the setting of the `-Z continue-parse-after-error` debug flag to determine whether we should leave the flag set to `true` or should change it to `false`. ---- (We might consider adding a debugflag to do such aborts in other places where we are currently attempting recovery, such as resolve, but I think the parser is the really important case to handle in the face of #31994 and the parser bugs of varying degrees that were injected by parse error recovery.) |
||
---|---|---|
.. | ||
diagnostics | ||
errors | ||
ext | ||
parse | ||
util | ||
abi.rs | ||
ast_util.rs | ||
ast.rs | ||
attr.rs | ||
Cargo.toml | ||
codemap.rs | ||
config.rs | ||
entry.rs | ||
feature_gate.rs | ||
fold.rs | ||
lib.rs | ||
owned_slice.rs | ||
ptr.rs | ||
show_span.rs | ||
std_inject.rs | ||
str.rs | ||
test.rs | ||
visit.rs |