about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-03-08 09:42:13 +0100
committerGitHub <noreply@github.com>2019-03-08 09:42:13 +0100
commit72d4c1ed67589aa1a2d28502b2e6453dd9467e8c (patch)
tree11011114377f17d65af53dec4c52dcccbc586f18 /src/libsyntax/parse
parentc51c90c8917caf0192ce8d76da72ada03891818b (diff)
parent29716ef4f75e0d5cb11f788c2e449db4ea3989ef (diff)
downloadrust-72d4c1ed67589aa1a2d28502b2e6453dd9467e8c.tar.gz
rust-72d4c1ed67589aa1a2d28502b2e6453dd9467e8c.zip
Rollup merge of #58984 - estebank:multi-treat-err-as-bug, r=oli-obk
Teach `-Z treat-err-as-bug` to take a number of errors to emit

`-Z treat-err-as-bug` will cause `rustc` to panic after the first error is reported, like previously. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 2 errors have been reported.

Fix #58983.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs2
-rw-r--r--src/libsyntax/parse/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index a7cde5fbb92..db5b8dcda4e 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -1920,7 +1920,7 @@ mod tests {
                                                           false,
                                                           false);
         ParseSess {
-            span_diagnostic: errors::Handler::with_emitter(true, false, Box::new(emitter)),
+            span_diagnostic: errors::Handler::with_emitter(true, None, Box::new(emitter)),
             unstable_features: UnstableFeatures::from_environment(),
             config: CrateConfig::default(),
             included_mod_stack: Lock::new(Vec::new()),
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index b2d4d97d57d..9cfcfcd6241 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -53,7 +53,7 @@ impl ParseSess {
         let cm = Lrc::new(SourceMap::new(file_path_mapping));
         let handler = Handler::with_tty_emitter(ColorConfig::Auto,
                                                 true,
-                                                false,
+                                                None,
                                                 Some(cm.clone()));
         ParseSess::with_span_handler(handler, cm)
     }