Don't add a new -Z flag, reuse -Zunstable-options

上级 c7cb2cf8
......@@ -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<bool> = (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());
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册