Stabilize -Z emit-future-incompat
as --json future-incompat
This commit is contained in:
parent
ff23ad3179
commit
63523e4d1c
6 changed files with 19 additions and 8 deletions
|
@ -746,6 +746,7 @@ impl Default for Options {
|
|||
edition: DEFAULT_EDITION,
|
||||
json_artifact_notifications: false,
|
||||
json_unused_externs: false,
|
||||
json_future_incompat: false,
|
||||
pretty: None,
|
||||
working_dir: RealFileName::LocalPath(std::env::current_dir().unwrap()),
|
||||
}
|
||||
|
@ -1257,6 +1258,7 @@ pub struct JsonConfig {
|
|||
pub json_rendered: HumanReadableErrorType,
|
||||
pub json_artifact_notifications: bool,
|
||||
pub json_unused_externs: bool,
|
||||
pub json_future_incompat: bool,
|
||||
}
|
||||
|
||||
/// Parse the `--json` flag.
|
||||
|
@ -1269,6 +1271,7 @@ pub fn parse_json(matches: &getopts::Matches) -> JsonConfig {
|
|||
let mut json_color = ColorConfig::Never;
|
||||
let mut json_artifact_notifications = false;
|
||||
let mut json_unused_externs = false;
|
||||
let mut json_future_incompat = false;
|
||||
for option in matches.opt_strs("json") {
|
||||
// For now conservatively forbid `--color` with `--json` since `--json`
|
||||
// won't actually be emitting any colors and anything colorized is
|
||||
|
@ -1286,6 +1289,7 @@ pub fn parse_json(matches: &getopts::Matches) -> JsonConfig {
|
|||
"diagnostic-rendered-ansi" => json_color = ColorConfig::Always,
|
||||
"artifacts" => json_artifact_notifications = true,
|
||||
"unused-externs" => json_unused_externs = true,
|
||||
"future-incompat" => json_future_incompat = true,
|
||||
s => early_error(
|
||||
ErrorOutputType::default(),
|
||||
&format!("unknown `--json` option `{}`", s),
|
||||
|
@ -1298,6 +1302,7 @@ pub fn parse_json(matches: &getopts::Matches) -> JsonConfig {
|
|||
json_rendered: json_rendered(json_color),
|
||||
json_artifact_notifications,
|
||||
json_unused_externs,
|
||||
json_future_incompat,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2011,8 +2016,12 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
|
|||
|
||||
let edition = parse_crate_edition(matches);
|
||||
|
||||
let JsonConfig { json_rendered, json_artifact_notifications, json_unused_externs } =
|
||||
parse_json(matches);
|
||||
let JsonConfig {
|
||||
json_rendered,
|
||||
json_artifact_notifications,
|
||||
json_unused_externs,
|
||||
json_future_incompat,
|
||||
} = parse_json(matches);
|
||||
|
||||
let error_format = parse_error_format(matches, color, json_rendered);
|
||||
|
||||
|
@ -2248,6 +2257,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
|
|||
edition,
|
||||
json_artifact_notifications,
|
||||
json_unused_externs,
|
||||
json_future_incompat,
|
||||
pretty,
|
||||
working_dir,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue