@@ -746,6 +746,7 @@ impl Default for Options {
746746 edition : DEFAULT_EDITION ,
747747 json_artifact_notifications : false ,
748748 json_unused_externs : false ,
749+ json_future_incompat : false ,
749750 pretty : None ,
750751 working_dir : RealFileName :: LocalPath ( std:: env:: current_dir ( ) . unwrap ( ) ) ,
751752 }
@@ -1257,6 +1258,7 @@ pub struct JsonConfig {
12571258 pub json_rendered : HumanReadableErrorType ,
12581259 pub json_artifact_notifications : bool ,
12591260 pub json_unused_externs : bool ,
1261+ pub json_future_incompat : bool ,
12601262}
12611263
12621264/// Parse the `--json` flag.
@@ -1269,6 +1271,7 @@ pub fn parse_json(matches: &getopts::Matches) -> JsonConfig {
12691271 let mut json_color = ColorConfig :: Never ;
12701272 let mut json_artifact_notifications = false ;
12711273 let mut json_unused_externs = false ;
1274+ let mut json_future_incompat = false ;
12721275 for option in matches. opt_strs ( "json" ) {
12731276 // For now conservatively forbid `--color` with `--json` since `--json`
12741277 // won't actually be emitting any colors and anything colorized is
@@ -1286,6 +1289,7 @@ pub fn parse_json(matches: &getopts::Matches) -> JsonConfig {
12861289 "diagnostic-rendered-ansi" => json_color = ColorConfig :: Always ,
12871290 "artifacts" => json_artifact_notifications = true ,
12881291 "unused-externs" => json_unused_externs = true ,
1292+ "future-incompat" => json_future_incompat = true ,
12891293 s => early_error (
12901294 ErrorOutputType :: default ( ) ,
12911295 & format ! ( "unknown `--json` option `{}`" , s) ,
@@ -1298,6 +1302,7 @@ pub fn parse_json(matches: &getopts::Matches) -> JsonConfig {
12981302 json_rendered : json_rendered ( json_color) ,
12991303 json_artifact_notifications,
13001304 json_unused_externs,
1305+ json_future_incompat,
13011306 }
13021307}
13031308
@@ -2011,8 +2016,12 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
20112016
20122017 let edition = parse_crate_edition ( matches) ;
20132018
2014- let JsonConfig { json_rendered, json_artifact_notifications, json_unused_externs } =
2015- parse_json ( matches) ;
2019+ let JsonConfig {
2020+ json_rendered,
2021+ json_artifact_notifications,
2022+ json_unused_externs,
2023+ json_future_incompat,
2024+ } = parse_json ( matches) ;
20162025
20172026 let error_format = parse_error_format ( matches, color, json_rendered) ;
20182027
@@ -2248,6 +2257,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
22482257 edition,
22492258 json_artifact_notifications,
22502259 json_unused_externs,
2260+ json_future_incompat,
22512261 pretty,
22522262 working_dir,
22532263 }
0 commit comments