diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 3e93a6332465b4766a9b21e8b8c7543481f0cec9..7a5b3afe5ae7da48eb27b5a4914ccd3d56fbb8cb 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1104,8 +1104,6 @@ fn parse_optimization_fuel(slot: &mut Option<(String, u64)>, v: Option<&str>) -> "enable ThinLTO when possible"), inline_in_all_cgus: Option = (None, parse_opt_bool, [TRACKED], "control whether #[inline] functions are in all cgus"), - pretty_json_error_format: bool = (false, parse_bool, [UNTRACKED], - "allow `--error-format=pretty-json` (used for compiletest)"), } pub fn default_lib_output() -> CrateType { @@ -1477,7 +1475,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches) let debugging_opts = build_debugging_options(matches, error_format); - if !debugging_opts.pretty_json_error_format && error_format == ErrorOutputType::Json(true) { + if !debugging_opts.unstable_options && error_format == ErrorOutputType::Json(true) { early_error(ErrorOutputType::Json(false), "--error-format=pretty-json is unstable \ (use -Zpretty-json-error-format)"); } @@ -2262,46 +2260,46 @@ fn test_search_paths_tracking_hash_different_values() { let mut v5 = super::basic_options(); // Reference - v1.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v1.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v1.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v1.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v1.search_paths.add_path("all=mno", super::ErrorOutputType::Json); + v1.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); // Native changed - v2.search_paths.add_path("native=XXX", super::ErrorOutputType::Json); - v2.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v2.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v2.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v2.search_paths.add_path("all=mno", super::ErrorOutputType::Json); + v2.search_paths.add_path("native=XXX", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); // Crate changed - v2.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v2.search_paths.add_path("crate=XXX", super::ErrorOutputType::Json); - v2.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v2.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v2.search_paths.add_path("all=mno", super::ErrorOutputType::Json); + v2.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("crate=XXX", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); // Dependency changed - v3.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v3.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v3.search_paths.add_path("dependency=XXX", super::ErrorOutputType::Json); - v3.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v3.search_paths.add_path("all=mno", super::ErrorOutputType::Json); + v3.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("dependency=XXX", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); // Framework changed - v4.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v4.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v4.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v4.search_paths.add_path("framework=XXX", super::ErrorOutputType::Json); - v4.search_paths.add_path("all=mno", super::ErrorOutputType::Json); + v4.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("framework=XXX", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); // All changed - v5.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v5.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v5.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v5.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v5.search_paths.add_path("all=XXX", super::ErrorOutputType::Json); + v5.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v5.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v5.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v5.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v5.search_paths.add_path("all=XXX", super::ErrorOutputType::Json(false)); assert!(v1.dep_tracking_hash() != v2.dep_tracking_hash()); assert!(v1.dep_tracking_hash() != v3.dep_tracking_hash()); @@ -2324,29 +2322,29 @@ fn test_search_paths_tracking_hash_different_order() { let mut v4 = super::basic_options(); // Reference - v1.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v1.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v1.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v1.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v1.search_paths.add_path("all=mno", super::ErrorOutputType::Json); - - v2.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v2.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v2.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v2.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v2.search_paths.add_path("all=mno", super::ErrorOutputType::Json); - - v3.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v3.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); - v3.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v3.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v3.search_paths.add_path("all=mno", super::ErrorOutputType::Json); - - v4.search_paths.add_path("all=mno", super::ErrorOutputType::Json); - v4.search_paths.add_path("native=abc", super::ErrorOutputType::Json); - v4.search_paths.add_path("crate=def", super::ErrorOutputType::Json); - v4.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json); - v4.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json); + v1.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v1.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); + + v2.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v2.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); + + v3.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v3.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); + + v4.search_paths.add_path("all=mno", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("native=abc", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("crate=def", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("dependency=ghi", super::ErrorOutputType::Json(false)); + v4.search_paths.add_path("framework=jkl", super::ErrorOutputType::Json(false)); assert!(v1.dep_tracking_hash() == v2.dep_tracking_hash()); assert!(v1.dep_tracking_hash() == v3.dep_tracking_hash()); diff --git a/src/test/ui/lint/unused_parens_json_suggestion.rs b/src/test/ui/lint/unused_parens_json_suggestion.rs index e05eac774bf4e84f63b354c9818b5b13e2cddc22..ad501e668095ae86cade1f29b49da5929e08a7ca 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.rs +++ b/src/test/ui/lint/unused_parens_json_suggestion.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags: --error-format pretty-json -Zpretty_json_error_format +// compile-flags: --error-format pretty-json -Zunstable-options // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested diff --git a/src/test/ui/lint/use_suggestion_json.rs b/src/test/ui/lint/use_suggestion_json.rs index 19169722b35b70e7c143f54fba9cdc18ae64ffd0..27232c4fec4ad89590c882df463e1bef7faaae28 100644 --- a/src/test/ui/lint/use_suggestion_json.rs +++ b/src/test/ui/lint/use_suggestion_json.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags: --error-format pretty-json -Zpretty_json_error_format +// compile-flags: --error-format pretty-json -Zunstable-options // The output for humans should just highlight the whole span without showing // the suggested replacement, but we also want to test that suggested