about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-01-09 00:22:20 +0100
committerGitHub <noreply@github.com>2020-01-09 00:22:20 +0100
commit5e6eeb092d68ab01f42070e54f2cb230affc6d54 (patch)
tree33f4ac1195594a0d1e2afa1128d9167deccb9e5e
parentd2922e51a7575834e4b9cd0c9bbedb2c4b9660b6 (diff)
parent41a93cba38e1813986d4068cf2d2ccfcc35ef178 (diff)
downloadrust-5e6eeb092d68ab01f42070e54f2cb230affc6d54.tar.gz
rust-5e6eeb092d68ab01f42070e54f2cb230affc6d54.zip
Rollup merge of #68024 - petrochenkov:recoverall, r=Centril
Remove `-Z continue-parse-after-error`

We are just always recovering and continuing now.

r? @estebank @Centril
-rw-r--r--src/librustc_codegen_ssa/back/write.rs1
-rw-r--r--src/librustc_driver/lib.rs1
-rw-r--r--src/librustc_errors/lib.rs20
-rw-r--r--src/librustc_interface/passes.rs3
-rw-r--r--src/librustc_interface/tests.rs4
-rw-r--r--src/librustc_session/options.rs2
-rw-r--r--src/test/ui/consts/miri_unleashed/mutable_const2.stderr2
-rw-r--r--src/test/ui/parse-error-correct.rs2
-rw-r--r--src/test/ui/parse-error-correct.stderr8
-rw-r--r--src/test/ui/parser-recovery-1.rs2
-rw-r--r--src/test/ui/parser-recovery-1.stderr8
-rw-r--r--src/test/ui/parser-recovery-2.rs2
-rw-r--r--src/test/ui/parser-recovery-2.stderr8
-rw-r--r--src/test/ui/parser/ascii-only-character-escape.rs2
-rw-r--r--src/test/ui/parser/ascii-only-character-escape.stderr6
-rw-r--r--src/test/ui/parser/bad-char-literals.rs3
-rw-r--r--src/test/ui/parser/bad-char-literals.stderr8
-rw-r--r--src/test/ui/parser/byte-literals.rs3
-rw-r--r--src/test/ui/parser/byte-literals.stderr14
-rw-r--r--src/test/ui/parser/byte-string-literals.rs2
-rw-r--r--src/test/ui/parser/byte-string-literals.stderr10
-rw-r--r--src/test/ui/parser/impl-parsing.rs2
-rw-r--r--src/test/ui/parser/impl-parsing.stderr10
-rw-r--r--src/test/ui/parser/issue-23620-invalid-escapes.rs2
-rw-r--r--src/test/ui/parser/issue-23620-invalid-escapes.stderr26
-rw-r--r--src/test/ui/parser/issue-62913.rs1
-rw-r--r--src/test/ui/parser/issue-62913.stderr8
-rw-r--r--src/test/ui/parser/lex-bad-char-literals-1.rs1
-rw-r--r--src/test/ui/parser/lex-bad-char-literals-1.stderr8
-rw-r--r--src/test/ui/parser/lex-bad-char-literals-7.rs1
-rw-r--r--src/test/ui/parser/lex-bad-char-literals-7.stderr6
-rw-r--r--src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs2
-rw-r--r--src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr14
-rw-r--r--src/test/ui/parser/raw-byte-string-literals.rs2
-rw-r--r--src/test/ui/parser/type-parameters-in-field-exprs.rs2
-rw-r--r--src/test/ui/parser/type-parameters-in-field-exprs.stderr6
36 files changed, 77 insertions, 125 deletions
diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs
index 075374fd8a9..32ba2dd65a3 100644
--- a/src/librustc_codegen_ssa/back/write.rs
+++ b/src/librustc_codegen_ssa/back/write.rs
@@ -1679,7 +1679,6 @@ impl SharedEmitterMain {
                         d.code(code);
                     }
                     handler.emit_diagnostic(&d);
-                    handler.abort_if_errors_and_should_abort();
                 }
                 Ok(SharedEmitterMessage::InlineAsmError(cookie, msg)) => {
                     sess.span_err(ExpnId::from_u32(cookie).expn_data().call_site, &msg)
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index dece0a55edd..8fbdf44de04 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -1178,7 +1178,6 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
     if !info.payload().is::<errors::ExplicitBug>() {
         let d = errors::Diagnostic::new(errors::Level::Bug, "unexpected panic");
         handler.emit_diagnostic(&d);
-        handler.abort_if_errors_and_should_abort();
     }
 
     let mut xs: Vec<Cow<'static, str>> = vec![
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 2279ed85954..99a6d6f8ec2 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -278,7 +278,6 @@ struct HandlerInner {
     err_count: usize,
     deduplicated_err_count: usize,
     emitter: Box<dyn Emitter + sync::Send>,
-    continue_after_error: bool,
     delayed_span_bugs: Vec<Diagnostic>,
 
     /// This set contains the `DiagnosticId` of all emitted diagnostics to avoid
@@ -402,7 +401,6 @@ impl Handler {
                 err_count: 0,
                 deduplicated_err_count: 0,
                 emitter,
-                continue_after_error: true,
                 delayed_span_bugs: Vec::new(),
                 taught_diagnostics: Default::default(),
                 emitted_diagnostic_codes: Default::default(),
@@ -412,10 +410,6 @@ impl Handler {
         }
     }
 
-    pub fn set_continue_after_error(&self, continue_after_error: bool) {
-        self.inner.borrow_mut().continue_after_error = continue_after_error;
-    }
-
     // This is here to not allow mutation of flags;
     // as of this writing it's only used in tests in librustc.
     pub fn can_emit_warnings(&self) -> bool {
@@ -672,10 +666,6 @@ impl Handler {
         self.inner.borrow_mut().abort_if_errors()
     }
 
-    pub fn abort_if_errors_and_should_abort(&self) {
-        self.inner.borrow_mut().abort_if_errors_and_should_abort()
-    }
-
     /// `true` if we haven't taught a diagnostic with this code already.
     /// The caller must then teach the user about such a diagnostic.
     ///
@@ -696,7 +686,6 @@ impl Handler {
     fn emit_diag_at_span(&self, mut diag: Diagnostic, sp: impl Into<MultiSpan>) {
         let mut inner = self.inner.borrow_mut();
         inner.emit_diagnostic(diag.set_span(sp));
-        inner.abort_if_errors_and_should_abort();
     }
 
     pub fn emit_artifact_notification(&self, path: &Path, artifact_type: &str) {
@@ -830,14 +819,6 @@ impl HandlerInner {
         self.has_errors() || !self.delayed_span_bugs.is_empty()
     }
 
-    fn abort_if_errors_and_should_abort(&mut self) {
-        self.emit_stashed_diagnostics();
-
-        if self.has_errors() && !self.continue_after_error {
-            FatalError.raise();
-        }
-    }
-
     fn abort_if_errors(&mut self) {
         self.emit_stashed_diagnostics();
 
@@ -853,7 +834,6 @@ impl HandlerInner {
 
     fn emit_diag_at_span(&mut self, mut diag: Diagnostic, sp: impl Into<MultiSpan>) {
         self.emit_diagnostic(diag.set_span(sp));
-        self.abort_if_errors_and_should_abort();
     }
 
     fn delay_span_bug(&mut self, sp: impl Into<MultiSpan>, msg: &str) {
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs
index 432f79bba03..6e776e7d554 100644
--- a/src/librustc_interface/passes.rs
+++ b/src/librustc_interface/passes.rs
@@ -54,7 +54,6 @@ use std::rc::Rc;
 use std::{env, fs, iter, mem};
 
 pub fn parse<'a>(sess: &'a Session, input: &Input) -> PResult<'a, ast::Crate> {
-    sess.diagnostic().set_continue_after_error(sess.opts.debugging_opts.continue_parse_after_error);
     let krate = sess.time("parsing", || match input {
         Input::File(file) => parse_crate_from_file(file, &sess.parse_sess),
         Input::Str { input, name } => {
@@ -62,8 +61,6 @@ pub fn parse<'a>(sess: &'a Session, input: &Input) -> PResult<'a, ast::Crate> {
         }
     })?;
 
-    sess.diagnostic().set_continue_after_error(true);
-
     if sess.opts.debugging_opts.ast_json_noexpand {
         println!("{}", json::as_json(&krate));
     }
diff --git a/src/librustc_interface/tests.rs b/src/librustc_interface/tests.rs
index 25ab7650b0e..c2e9c35fcd4 100644
--- a/src/librustc_interface/tests.rs
+++ b/src/librustc_interface/tests.rs
@@ -602,10 +602,6 @@ fn test_debugging_options_tracking_hash() {
     assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
 
     opts = reference.clone();
-    opts.debugging_opts.continue_parse_after_error = true;
-    assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
-
-    opts = reference.clone();
     opts.debugging_opts.force_overflow_checks = Some(true);
     assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
 
diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs
index 656c1b019b2..4b5736adc17 100644
--- a/src/librustc_session/options.rs
+++ b/src/librustc_session/options.rs
@@ -772,8 +772,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
         "set the current terminal width"),
     panic_abort_tests: bool = (false, parse_bool, [TRACKED],
         "support compiling tests with panic=abort"),
-    continue_parse_after_error: bool = (false, parse_bool, [TRACKED],
-        "attempt to recover from parse errors (experimental)"),
     dep_tasks: bool = (false, parse_bool, [UNTRACKED],
         "print tasks that execute and the color their dep node gets (requires debug build)"),
     incremental: Option<String> = (None, parse_opt_string, [UNTRACKED],
diff --git a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
index 3493b7c54c4..88418e57acd 100644
--- a/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
+++ b/src/test/ui/consts/miri_unleashed/mutable_const2.stderr
@@ -10,7 +10,7 @@ error: internal compiler error: mutable allocation in constant
 LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:347:17
+thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:346:17
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
 
 error: internal compiler error: unexpected panic
diff --git a/src/test/ui/parse-error-correct.rs b/src/test/ui/parse-error-correct.rs
index f167b3595d9..13759a23519 100644
--- a/src/test/ui/parse-error-correct.rs
+++ b/src/test/ui/parse-error-correct.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 // Test that the parser is error correcting missing idents. Despite a parsing
 // error (or two), we still run type checking (and don't get extra errors there).
 
diff --git a/src/test/ui/parse-error-correct.stderr b/src/test/ui/parse-error-correct.stderr
index d593431d978..c54baf00b27 100644
--- a/src/test/ui/parse-error-correct.stderr
+++ b/src/test/ui/parse-error-correct.stderr
@@ -1,17 +1,17 @@
 error: unexpected token: `;`
-  --> $DIR/parse-error-correct.rs:8:15
+  --> $DIR/parse-error-correct.rs:6:15
    |
 LL |     let x = y.;
    |               ^
 
 error: unexpected token: `(`
-  --> $DIR/parse-error-correct.rs:9:15
+  --> $DIR/parse-error-correct.rs:7:15
    |
 LL |     let x = y.();
    |               ^
 
 error[E0618]: expected function, found `{integer}`
-  --> $DIR/parse-error-correct.rs:9:13
+  --> $DIR/parse-error-correct.rs:7:13
    |
 LL |     let y = 42;
    |         - `{integer}` defined here
@@ -22,7 +22,7 @@ LL |     let x = y.();
    |             call expression requires function
 
 error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
-  --> $DIR/parse-error-correct.rs:11:15
+  --> $DIR/parse-error-correct.rs:9:15
    |
 LL |     let x = y.foo;
    |               ^^^
diff --git a/src/test/ui/parser-recovery-1.rs b/src/test/ui/parser-recovery-1.rs
index dcc0dc00a72..7e26b4f2b6a 100644
--- a/src/test/ui/parser-recovery-1.rs
+++ b/src/test/ui/parser-recovery-1.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 // Test that we can recover from missing braces in the parser.
 
 trait Foo {
diff --git a/src/test/ui/parser-recovery-1.stderr b/src/test/ui/parser-recovery-1.stderr
index 4d881918c40..f56060c3e35 100644
--- a/src/test/ui/parser-recovery-1.stderr
+++ b/src/test/ui/parser-recovery-1.stderr
@@ -1,5 +1,5 @@
 error: this file contains an unclosed delimiter
-  --> $DIR/parser-recovery-1.rs:15:54
+  --> $DIR/parser-recovery-1.rs:13:54
    |
 LL | trait Foo {
    |           - unclosed delimiter
@@ -13,19 +13,19 @@ LL | }
    |                                                      ^
 
 error: unexpected token: `;`
-  --> $DIR/parser-recovery-1.rs:12:15
+  --> $DIR/parser-recovery-1.rs:10:15
    |
 LL |     let x = y.;
    |               ^
 
 error[E0425]: cannot find function `foo` in this scope
-  --> $DIR/parser-recovery-1.rs:7:17
+  --> $DIR/parser-recovery-1.rs:5:17
    |
 LL |         let x = foo();
    |                 ^^^ not found in this scope
 
 error[E0425]: cannot find value `y` in this scope
-  --> $DIR/parser-recovery-1.rs:12:13
+  --> $DIR/parser-recovery-1.rs:10:13
    |
 LL |     let x = y.;
    |             ^ not found in this scope
diff --git a/src/test/ui/parser-recovery-2.rs b/src/test/ui/parser-recovery-2.rs
index dc5be96cc64..48b22afffe7 100644
--- a/src/test/ui/parser-recovery-2.rs
+++ b/src/test/ui/parser-recovery-2.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 // Test that we can recover from mismatched braces in the parser.
 
 trait Foo {
diff --git a/src/test/ui/parser-recovery-2.stderr b/src/test/ui/parser-recovery-2.stderr
index c48211d4064..cd3da4c71f0 100644
--- a/src/test/ui/parser-recovery-2.stderr
+++ b/src/test/ui/parser-recovery-2.stderr
@@ -1,11 +1,11 @@
 error: unexpected token: `;`
-  --> $DIR/parser-recovery-2.rs:12:15
+  --> $DIR/parser-recovery-2.rs:10:15
    |
 LL |     let x = y.;
    |               ^
 
 error: mismatched closing delimiter: `)`
-  --> $DIR/parser-recovery-2.rs:8:5
+  --> $DIR/parser-recovery-2.rs:6:5
    |
 LL |     fn bar() {
    |              - unclosed delimiter
@@ -14,13 +14,13 @@ LL |     )
    |     ^ mismatched closing delimiter
 
 error[E0425]: cannot find function `foo` in this scope
-  --> $DIR/parser-recovery-2.rs:7:17
+  --> $DIR/parser-recovery-2.rs:5:17
    |
 LL |         let x = foo();
    |                 ^^^ not found in this scope
 
 error[E0425]: cannot find value `y` in this scope
-  --> $DIR/parser-recovery-2.rs:12:13
+  --> $DIR/parser-recovery-2.rs:10:13
    |
 LL |     let x = y.;
    |             ^ not found in this scope
diff --git a/src/test/ui/parser/ascii-only-character-escape.rs b/src/test/ui/parser/ascii-only-character-escape.rs
index f1b028ea8de..20d3edf1251 100644
--- a/src/test/ui/parser/ascii-only-character-escape.rs
+++ b/src/test/ui/parser/ascii-only-character-escape.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 fn main() {
     let x = "\x80"; //~ ERROR may only be used
     let y = "\xff"; //~ ERROR may only be used
diff --git a/src/test/ui/parser/ascii-only-character-escape.stderr b/src/test/ui/parser/ascii-only-character-escape.stderr
index 39167791758..cf51b00cdc3 100644
--- a/src/test/ui/parser/ascii-only-character-escape.stderr
+++ b/src/test/ui/parser/ascii-only-character-escape.stderr
@@ -1,17 +1,17 @@
 error: this form of character escape may only be used with characters in the range [\x00-\x7f]
-  --> $DIR/ascii-only-character-escape.rs:4:14
+  --> $DIR/ascii-only-character-escape.rs:2:14
    |
 LL |     let x = "\x80";
    |              ^^^^
 
 error: this form of character escape may only be used with characters in the range [\x00-\x7f]
-  --> $DIR/ascii-only-character-escape.rs:5:14
+  --> $DIR/ascii-only-character-escape.rs:3:14
    |
 LL |     let y = "\xff";
    |              ^^^^
 
 error: this form of character escape may only be used with characters in the range [\x00-\x7f]
-  --> $DIR/ascii-only-character-escape.rs:6:14
+  --> $DIR/ascii-only-character-escape.rs:4:14
    |
 LL |     let z = "\xe2";
    |              ^^^^
diff --git a/src/test/ui/parser/bad-char-literals.rs b/src/test/ui/parser/bad-char-literals.rs
index 1c9b5973be7..11696b82bc9 100644
--- a/src/test/ui/parser/bad-char-literals.rs
+++ b/src/test/ui/parser/bad-char-literals.rs
@@ -1,7 +1,6 @@
-// compile-flags: -Z continue-parse-after-error
-
 // ignore-tidy-cr
 // ignore-tidy-tab
+
 fn main() {
     // these literals are just silly.
     ''';
diff --git a/src/test/ui/parser/bad-char-literals.stderr b/src/test/ui/parser/bad-char-literals.stderr
index 8e96ea22771..093978fd84d 100644
--- a/src/test/ui/parser/bad-char-literals.stderr
+++ b/src/test/ui/parser/bad-char-literals.stderr
@@ -1,11 +1,11 @@
 error: character constant must be escaped: '
-  --> $DIR/bad-char-literals.rs:7:6
+  --> $DIR/bad-char-literals.rs:6:6
    |
 LL |     ''';
    |      ^
 
 error: character constant must be escaped: \n
-  --> $DIR/bad-char-literals.rs:11:6
+  --> $DIR/bad-char-literals.rs:10:6
    |
 LL |       '
    |  ______^
@@ -13,13 +13,13 @@ LL | | ';
    | |_
 
 error: character constant must be escaped: \r
-  --> $DIR/bad-char-literals.rs:16:6
+  --> $DIR/bad-char-literals.rs:15:6
    |
 LL |     '
';
    |      ^
 
 error: character constant must be escaped: \t
-  --> $DIR/bad-char-literals.rs:19:6
+  --> $DIR/bad-char-literals.rs:18:6
    |
 LL |     '    ';
    |      ^^^^
diff --git a/src/test/ui/parser/byte-literals.rs b/src/test/ui/parser/byte-literals.rs
index bd358af2984..dadf3971220 100644
--- a/src/test/ui/parser/byte-literals.rs
+++ b/src/test/ui/parser/byte-literals.rs
@@ -1,6 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
-
 // ignore-tidy-tab
 
 static FOO: u8 = b'\f';  //~ ERROR unknown byte escape
diff --git a/src/test/ui/parser/byte-literals.stderr b/src/test/ui/parser/byte-literals.stderr
index 58a5797b907..53d50af88d3 100644
--- a/src/test/ui/parser/byte-literals.stderr
+++ b/src/test/ui/parser/byte-literals.stderr
@@ -1,41 +1,41 @@
 error: unknown byte escape: f
-  --> $DIR/byte-literals.rs:6:21
+  --> $DIR/byte-literals.rs:3:21
    |
 LL | static FOO: u8 = b'\f';
    |                     ^ unknown byte escape
 
 error: unknown byte escape: f
-  --> $DIR/byte-literals.rs:9:8
+  --> $DIR/byte-literals.rs:6:8
    |
 LL |     b'\f';
    |        ^ unknown byte escape
 
 error: invalid character in numeric character escape: Z
-  --> $DIR/byte-literals.rs:10:10
+  --> $DIR/byte-literals.rs:7:10
    |
 LL |     b'\x0Z';
    |          ^
 
 error: byte constant must be escaped: \t
-  --> $DIR/byte-literals.rs:11:7
+  --> $DIR/byte-literals.rs:8:7
    |
 LL |     b'    ';
    |       ^^^^
 
 error: byte constant must be escaped: '
-  --> $DIR/byte-literals.rs:12:7
+  --> $DIR/byte-literals.rs:9:7
    |
 LL |     b''';
    |       ^
 
 error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte
-  --> $DIR/byte-literals.rs:13:7
+  --> $DIR/byte-literals.rs:10:7
    |
 LL |     b'é';
    |       ^
 
 error: unterminated byte constant
-  --> $DIR/byte-literals.rs:14:6
+  --> $DIR/byte-literals.rs:11:6
    |
 LL |     b'a
    |      ^^^^
diff --git a/src/test/ui/parser/byte-string-literals.rs b/src/test/ui/parser/byte-string-literals.rs
index 8d8ee4da987..caffd9efbed 100644
--- a/src/test/ui/parser/byte-string-literals.rs
+++ b/src/test/ui/parser/byte-string-literals.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 static FOO: &'static [u8] = b"\f";  //~ ERROR unknown byte escape
 
 pub fn main() {
diff --git a/src/test/ui/parser/byte-string-literals.stderr b/src/test/ui/parser/byte-string-literals.stderr
index eeb2fcd1232..ca964cd4b8f 100644
--- a/src/test/ui/parser/byte-string-literals.stderr
+++ b/src/test/ui/parser/byte-string-literals.stderr
@@ -1,29 +1,29 @@
 error: unknown byte escape: f
-  --> $DIR/byte-string-literals.rs:3:32
+  --> $DIR/byte-string-literals.rs:1:32
    |
 LL | static FOO: &'static [u8] = b"\f";
    |                                ^ unknown byte escape
 
 error: unknown byte escape: f
-  --> $DIR/byte-string-literals.rs:6:8
+  --> $DIR/byte-string-literals.rs:4:8
    |
 LL |     b"\f";
    |        ^ unknown byte escape
 
 error: invalid character in numeric character escape: Z
-  --> $DIR/byte-string-literals.rs:7:10
+  --> $DIR/byte-string-literals.rs:5:10
    |
 LL |     b"\x0Z";
    |          ^
 
 error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte
-  --> $DIR/byte-string-literals.rs:8:7
+  --> $DIR/byte-string-literals.rs:6:7
    |
 LL |     b"é";
    |       ^
 
 error: unterminated double quote byte string
-  --> $DIR/byte-string-literals.rs:9:6
+  --> $DIR/byte-string-literals.rs:7:6
    |
 LL |       b"a
    |  ______^
diff --git a/src/test/ui/parser/impl-parsing.rs b/src/test/ui/parser/impl-parsing.rs
index c2a80e8fa15..270c8b43dfd 100644
--- a/src/test/ui/parser/impl-parsing.rs
+++ b/src/test/ui/parser/impl-parsing.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 impl ! {} // OK
 impl ! where u8: Copy {} // OK
 
diff --git a/src/test/ui/parser/impl-parsing.stderr b/src/test/ui/parser/impl-parsing.stderr
index e929fa53620..7c2a7937c5d 100644
--- a/src/test/ui/parser/impl-parsing.stderr
+++ b/src/test/ui/parser/impl-parsing.stderr
@@ -1,29 +1,29 @@
 error: missing `for` in a trait impl
-  --> $DIR/impl-parsing.rs:6:11
+  --> $DIR/impl-parsing.rs:4:11
    |
 LL | impl Trait Type {}
    |           ^ help: add `for` here
 
 error: missing `for` in a trait impl
-  --> $DIR/impl-parsing.rs:7:11
+  --> $DIR/impl-parsing.rs:5:11
    |
 LL | impl Trait .. {}
    |           ^ help: add `for` here
 
 error: expected a trait, found type
-  --> $DIR/impl-parsing.rs:8:6
+  --> $DIR/impl-parsing.rs:6:6
    |
 LL | impl ?Sized for Type {}
    |      ^^^^^^
 
 error: expected a trait, found type
-  --> $DIR/impl-parsing.rs:9:6
+  --> $DIR/impl-parsing.rs:7:6
    |
 LL | impl ?Sized for .. {}
    |      ^^^^^^
 
 error: expected `impl`, found `FAIL`
-  --> $DIR/impl-parsing.rs:11:16
+  --> $DIR/impl-parsing.rs:9:16
    |
 LL | default unsafe FAIL
    |                ^^^^ expected `impl`
diff --git a/src/test/ui/parser/issue-23620-invalid-escapes.rs b/src/test/ui/parser/issue-23620-invalid-escapes.rs
index 53629973a1b..ab445a93294 100644
--- a/src/test/ui/parser/issue-23620-invalid-escapes.rs
+++ b/src/test/ui/parser/issue-23620-invalid-escapes.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 fn main() {
     let _ = b"\u{a66e}";
     //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
diff --git a/src/test/ui/parser/issue-23620-invalid-escapes.stderr b/src/test/ui/parser/issue-23620-invalid-escapes.stderr
index 5fabc1d7e43..b391ac75bf8 100644
--- a/src/test/ui/parser/issue-23620-invalid-escapes.stderr
+++ b/src/test/ui/parser/issue-23620-invalid-escapes.stderr
@@ -1,17 +1,17 @@
 error: unicode escape sequences cannot be used as a byte or in a byte string
-  --> $DIR/issue-23620-invalid-escapes.rs:4:15
+  --> $DIR/issue-23620-invalid-escapes.rs:2:15
    |
 LL |     let _ = b"\u{a66e}";
    |               ^^^^^^^^
 
 error: unicode escape sequences cannot be used as a byte or in a byte string
-  --> $DIR/issue-23620-invalid-escapes.rs:7:15
+  --> $DIR/issue-23620-invalid-escapes.rs:5:15
    |
 LL |     let _ = b'\u{a66e}';
    |               ^^^^^^^^
 
 error: incorrect unicode escape sequence
-  --> $DIR/issue-23620-invalid-escapes.rs:10:15
+  --> $DIR/issue-23620-invalid-escapes.rs:8:15
    |
 LL |     let _ = b'\u';
    |               ^^ incorrect unicode escape sequence
@@ -19,43 +19,43 @@ LL |     let _ = b'\u';
    = help: format of unicode escape sequences is `\u{...}`
 
 error: numeric character escape is too short
-  --> $DIR/issue-23620-invalid-escapes.rs:13:15
+  --> $DIR/issue-23620-invalid-escapes.rs:11:15
    |
 LL |     let _ = b'\x5';
    |               ^^^
 
 error: invalid character in numeric character escape: x
-  --> $DIR/issue-23620-invalid-escapes.rs:16:17
+  --> $DIR/issue-23620-invalid-escapes.rs:14:17
    |
 LL |     let _ = b'\xxy';
    |                 ^
 
 error: numeric character escape is too short
-  --> $DIR/issue-23620-invalid-escapes.rs:19:14
+  --> $DIR/issue-23620-invalid-escapes.rs:17:14
    |
 LL |     let _ = '\x5';
    |              ^^^
 
 error: invalid character in numeric character escape: x
-  --> $DIR/issue-23620-invalid-escapes.rs:22:16
+  --> $DIR/issue-23620-invalid-escapes.rs:20:16
    |
 LL |     let _ = '\xxy';
    |                ^
 
 error: unicode escape sequences cannot be used as a byte or in a byte string
-  --> $DIR/issue-23620-invalid-escapes.rs:25:15
+  --> $DIR/issue-23620-invalid-escapes.rs:23:15
    |
 LL |     let _ = b"\u{a4a4} \xf \u";
    |               ^^^^^^^^
 
 error: invalid character in numeric character escape:  
-  --> $DIR/issue-23620-invalid-escapes.rs:25:27
+  --> $DIR/issue-23620-invalid-escapes.rs:23:27
    |
 LL |     let _ = b"\u{a4a4} \xf \u";
    |                           ^
 
 error: incorrect unicode escape sequence
-  --> $DIR/issue-23620-invalid-escapes.rs:25:28
+  --> $DIR/issue-23620-invalid-escapes.rs:23:28
    |
 LL |     let _ = b"\u{a4a4} \xf \u";
    |                            ^^ incorrect unicode escape sequence
@@ -63,13 +63,13 @@ LL |     let _ = b"\u{a4a4} \xf \u";
    = help: format of unicode escape sequences is `\u{...}`
 
 error: invalid character in numeric character escape:  
-  --> $DIR/issue-23620-invalid-escapes.rs:30:17
+  --> $DIR/issue-23620-invalid-escapes.rs:28:17
    |
 LL |     let _ = "\xf \u";
    |                 ^
 
 error: incorrect unicode escape sequence
-  --> $DIR/issue-23620-invalid-escapes.rs:30:18
+  --> $DIR/issue-23620-invalid-escapes.rs:28:18
    |
 LL |     let _ = "\xf \u";
    |                  ^^ incorrect unicode escape sequence
@@ -77,7 +77,7 @@ LL |     let _ = "\xf \u";
    = help: format of unicode escape sequences is `\u{...}`
 
 error: incorrect unicode escape sequence
-  --> $DIR/issue-23620-invalid-escapes.rs:34:14
+  --> $DIR/issue-23620-invalid-escapes.rs:32:14
    |
 LL |     let _ = "\u8f";
    |              ^^--
diff --git a/src/test/ui/parser/issue-62913.rs b/src/test/ui/parser/issue-62913.rs
index cfa19a2a310..0db06f636c3 100644
--- a/src/test/ui/parser/issue-62913.rs
+++ b/src/test/ui/parser/issue-62913.rs
@@ -1,3 +1,4 @@
 "\u\\"
 //~^ ERROR incorrect unicode escape sequence
 //~| ERROR invalid trailing slash in literal
+//~| ERROR expected item, found `"\u\\"`
diff --git a/src/test/ui/parser/issue-62913.stderr b/src/test/ui/parser/issue-62913.stderr
index 05c5c4d000a..f72174f8929 100644
--- a/src/test/ui/parser/issue-62913.stderr
+++ b/src/test/ui/parser/issue-62913.stderr
@@ -12,5 +12,11 @@ error: invalid trailing slash in literal
 LL | "\u\"
    |     ^
 
-error: aborting due to 2 previous errors
+error: expected item, found `"\u\"`
+  --> $DIR/issue-62913.rs:1:1
+   |
+LL | "\u\"
+   | ^^^^^^ expected item
+
+error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/parser/lex-bad-char-literals-1.rs b/src/test/ui/parser/lex-bad-char-literals-1.rs
index 54d75ed682d..e7951cfd2d2 100644
--- a/src/test/ui/parser/lex-bad-char-literals-1.rs
+++ b/src/test/ui/parser/lex-bad-char-literals-1.rs
@@ -1,4 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
 static c3: char =
     '\x1' //~ ERROR: numeric character escape is too short
 ;
diff --git a/src/test/ui/parser/lex-bad-char-literals-1.stderr b/src/test/ui/parser/lex-bad-char-literals-1.stderr
index 000d155c268..fcf4802f79b 100644
--- a/src/test/ui/parser/lex-bad-char-literals-1.stderr
+++ b/src/test/ui/parser/lex-bad-char-literals-1.stderr
@@ -1,23 +1,23 @@
 error: numeric character escape is too short
-  --> $DIR/lex-bad-char-literals-1.rs:3:6
+  --> $DIR/lex-bad-char-literals-1.rs:2:6
    |
 LL |     '\x1'
    |      ^^^
 
 error: numeric character escape is too short
-  --> $DIR/lex-bad-char-literals-1.rs:7:6
+  --> $DIR/lex-bad-char-literals-1.rs:6:6
    |
 LL |     "\x1"
    |      ^^^
 
 error: unknown character escape: \u{25cf}
-  --> $DIR/lex-bad-char-literals-1.rs:11:7
+  --> $DIR/lex-bad-char-literals-1.rs:10:7
    |
 LL |     '\●'
    |       ^ unknown character escape
 
 error: unknown character escape: \u{25cf}
-  --> $DIR/lex-bad-char-literals-1.rs:15:7
+  --> $DIR/lex-bad-char-literals-1.rs:14:7
    |
 LL |     "\●"
    |       ^ unknown character escape
diff --git a/src/test/ui/parser/lex-bad-char-literals-7.rs b/src/test/ui/parser/lex-bad-char-literals-7.rs
index 70eafcb91da..1580157210e 100644
--- a/src/test/ui/parser/lex-bad-char-literals-7.rs
+++ b/src/test/ui/parser/lex-bad-char-literals-7.rs
@@ -1,4 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
 fn main() {
     let _: char = '';
     //~^ ERROR: empty character literal
diff --git a/src/test/ui/parser/lex-bad-char-literals-7.stderr b/src/test/ui/parser/lex-bad-char-literals-7.stderr
index e1ba3c3ee0f..ee9aa869352 100644
--- a/src/test/ui/parser/lex-bad-char-literals-7.stderr
+++ b/src/test/ui/parser/lex-bad-char-literals-7.stderr
@@ -1,17 +1,17 @@
 error: empty character literal
-  --> $DIR/lex-bad-char-literals-7.rs:3:20
+  --> $DIR/lex-bad-char-literals-7.rs:2:20
    |
 LL |     let _: char = '';
    |                    ^
 
 error: empty unicode escape (must have at least 1 hex digit)
-  --> $DIR/lex-bad-char-literals-7.rs:5:20
+  --> $DIR/lex-bad-char-literals-7.rs:4:20
    |
 LL |     let _: char = '\u{}';
    |                    ^^^^
 
 error: unterminated character literal
-  --> $DIR/lex-bad-char-literals-7.rs:12:13
+  --> $DIR/lex-bad-char-literals-7.rs:11:13
    |
 LL |     let _ = ' hello // here's a comment
    |             ^^^^^^^^
diff --git a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs
index b588b007ae9..9a9f9c433e1 100644
--- a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs
+++ b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 // ignore-tidy-cr
 
 /// doc comment with bare CR: '
'
diff --git a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr
index b0fe4b6acd4..598da6b9307 100644
--- a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr
+++ b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr
@@ -1,41 +1,41 @@
 error: bare CR not allowed in doc-comment
-  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:5:32
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32
    |
 LL | /// doc comment with bare CR: '
'
    |                                ^
 
 error: bare CR not allowed in block doc-comment
-  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:9:38
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:7:38
    |
 LL | /** block doc comment with bare CR: '
' */
    |                                      ^
 
 error: bare CR not allowed in doc-comment
-  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:14:36
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:12:36
    |
 LL |     //! doc comment with bare CR: '
'
    |                                    ^
 
 error: bare CR not allowed in block doc-comment
-  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:17:42
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:15:42
    |
 LL |     /*! block doc comment with bare CR: '
' */
    |                                          ^
 
 error: bare CR not allowed in string, use \r instead
-  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:21:18
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:19:18
    |
 LL |     let _s = "foo
bar";
    |                  ^
 
 error: bare CR not allowed in raw string
-  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:24:19
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:22:19
    |
 LL |     let _s = r"bar
foo";
    |                   ^
 
 error: unknown character escape: \r
-  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:27:19
+  --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:25:19
    |
 LL |     let _s = "foo\
bar";
    |                   ^ unknown character escape
diff --git a/src/test/ui/parser/raw-byte-string-literals.rs b/src/test/ui/parser/raw-byte-string-literals.rs
index 534afabdf77..163c8ac66b0 100644
--- a/src/test/ui/parser/raw-byte-string-literals.rs
+++ b/src/test/ui/parser/raw-byte-string-literals.rs
@@ -1,5 +1,5 @@
 // ignore-tidy-cr
-// compile-flags: -Z continue-parse-after-error
+
 pub fn main() {
     br"a
"; //~ ERROR bare CR not allowed in raw string
     br"é";  //~ ERROR raw byte string must be ASCII
diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.rs b/src/test/ui/parser/type-parameters-in-field-exprs.rs
index 1b8ed9f12b8..6a3b2c1c606 100644
--- a/src/test/ui/parser/type-parameters-in-field-exprs.rs
+++ b/src/test/ui/parser/type-parameters-in-field-exprs.rs
@@ -1,5 +1,3 @@
-// compile-flags: -Z continue-parse-after-error
-
 struct Foo {
     x: isize,
     y: isize,
diff --git a/src/test/ui/parser/type-parameters-in-field-exprs.stderr b/src/test/ui/parser/type-parameters-in-field-exprs.stderr
index 8f32fb0eca1..306b4754d0d 100644
--- a/src/test/ui/parser/type-parameters-in-field-exprs.stderr
+++ b/src/test/ui/parser/type-parameters-in-field-exprs.stderr
@@ -1,17 +1,17 @@
 error: field expressions may not have generic arguments
-  --> $DIR/type-parameters-in-field-exprs.rs:13:10
+  --> $DIR/type-parameters-in-field-exprs.rs:11:10
    |
 LL |     f.x::<isize>;
    |          ^^^^^^^
 
 error: field expressions may not have generic arguments
-  --> $DIR/type-parameters-in-field-exprs.rs:15:10
+  --> $DIR/type-parameters-in-field-exprs.rs:13:10
    |
 LL |     f.x::<>;
    |          ^^
 
 error: field expressions may not have generic arguments
-  --> $DIR/type-parameters-in-field-exprs.rs:17:7
+  --> $DIR/type-parameters-in-field-exprs.rs:15:7
    |
 LL |     f.x::();
    |       ^^^^^