Set short-message feature unstable
This commit is contained in:
parent
58557fafae
commit
9338b4903a
@ -1435,8 +1435,15 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
|
|||||||
Some("human") => ErrorOutputType::HumanReadable(color),
|
Some("human") => ErrorOutputType::HumanReadable(color),
|
||||||
Some("json") => ErrorOutputType::Json(false),
|
Some("json") => ErrorOutputType::Json(false),
|
||||||
Some("pretty-json") => ErrorOutputType::Json(true),
|
Some("pretty-json") => ErrorOutputType::Json(true),
|
||||||
Some("short") => ErrorOutputType::Short(color),
|
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"));
|
||||||
|
}
|
||||||
|
}
|
||||||
None => ErrorOutputType::HumanReadable(color),
|
None => ErrorOutputType::HumanReadable(color),
|
||||||
|
|
||||||
Some(arg) => {
|
Some(arg) => {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
// compile-flags: --error-format=short
|
// compile-flags: --error-format=short -Zunstable-options
|
||||||
|
|
||||||
fn foo(_: u32) {}
|
fn foo(_: u32) {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user