about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-05-31 22:17:09 +0200
committerGitHub <noreply@github.com>2018-05-31 22:17:09 +0200
commit0345dac0d8acb50690f59e0ea0c8ddf114a008c1 (patch)
tree6d1b8669f198cc487bf528f8f3bb4bf1090955b6
parent5342d40c1f49ef82ebff4c30fdad9f3b6fd339c1 (diff)
parent426b63f8a3aed16b293a34345714c13c836e9276 (diff)
downloadrust-0345dac0d8acb50690f59e0ea0c8ddf114a008c1.tar.gz
rust-0345dac0d8acb50690f59e0ea0c8ddf114a008c1.zip
Rollup merge of #49546 - GuillaumeGomez:stabilize-short-error-format, r=oli-obk
Stabilize short error format

r? @oli-obk

Added in https://github.com/rust-lang/rust/pull/44636
-rw-r--r--src/librustc/session/config.rs14
-rw-r--r--src/librustc_errors/emitter.rs2
-rw-r--r--src/test/ui/short-error-format.rs2
-rw-r--r--src/test/ui/short-error-format.stderr4
4 files changed, 5 insertions, 17 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 35538e5d02a..cc8e8c7c31c 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1799,19 +1799,7 @@ pub fn build_session_options_and_crate_config(
             Some("human") => ErrorOutputType::HumanReadable(color),
             Some("json") => ErrorOutputType::Json(false),
             Some("pretty-json") => ErrorOutputType::Json(true),
-            Some("short") => {
-                if nightly_options::is_unstable_enabled(matches) {
-                    ErrorOutputType::Short(color)
-                } else {
-                    early_error(
-                        ErrorOutputType::default(),
-                        &format!(
-                            "the `-Z unstable-options` flag must also be passed to \
-                             enable the short error message option"
-                        ),
-                    );
-                }
-            }
+            Some("short") => ErrorOutputType::Short(color),
             None => ErrorOutputType::HumanReadable(color),
 
             Some(arg) => early_error(
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs
index 4d1d33e1325..f65acf08c86 100644
--- a/src/librustc_errors/emitter.rs
+++ b/src/librustc_errors/emitter.rs
@@ -1047,7 +1047,7 @@ impl EmitterWriter {
                     }
                 } else {
                     buffer.prepend(0,
-                                   &format!("{}:{}:{} - ",
+                                   &format!("{}:{}:{}: ",
                                             loc.file.name,
                                             cm.doctest_offset_line(loc.line),
                                             loc.col.0 + 1),
diff --git a/src/test/ui/short-error-format.rs b/src/test/ui/short-error-format.rs
index ecce824ca17..3e6802c51c3 100644
--- a/src/test/ui/short-error-format.rs
+++ b/src/test/ui/short-error-format.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags: --error-format=short -Zunstable-options
+// compile-flags: --error-format=short
 
 fn foo(_: u32) {}
 
diff --git a/src/test/ui/short-error-format.stderr b/src/test/ui/short-error-format.stderr
index debe60b4632..f7461b837bd 100644
--- a/src/test/ui/short-error-format.stderr
+++ b/src/test/ui/short-error-format.stderr
@@ -1,3 +1,3 @@
-$DIR/short-error-format.rs:16:9 - error[E0308]: mismatched types
-$DIR/short-error-format.rs:18:7 - error[E0599]: no method named `salut` found for type `u32` in the current scope
+$DIR/short-error-format.rs:16:9: error[E0308]: mismatched types
+$DIR/short-error-format.rs:18:7: error[E0599]: no method named `salut` found for type `u32` in the current scope
 error: aborting due to 2 previous errors