File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1471,8 +1471,15 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
1471
1471
Some ( "human" ) => ErrorOutputType :: HumanReadable ( color) ,
1472
1472
Some ( "json" ) => ErrorOutputType :: Json ( false ) ,
1473
1473
Some ( "pretty-json" ) => ErrorOutputType :: Json ( true ) ,
1474
- Some ( "short" ) => ErrorOutputType :: Short ( color) ,
1475
-
1474
+ Some ( "short" ) => {
1475
+ if nightly_options:: is_unstable_enabled ( matches) {
1476
+ ErrorOutputType :: Short ( color)
1477
+ } else {
1478
+ early_error ( ErrorOutputType :: default ( ) ,
1479
+ & format ! ( "the `-Z unstable-options` flag must also be passed to \
1480
+ enable the short error message option") ) ;
1481
+ }
1482
+ }
1476
1483
None => ErrorOutputType :: HumanReadable ( color) ,
1477
1484
1478
1485
Some ( arg) => {
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- // compile-flags: --error-format=short
11
+ // compile-flags: --error-format=short -Zunstable-options
12
12
13
13
fn foo ( _: u32 ) { }
14
14
You can’t perform that action at this time.
0 commit comments