提交 c6a23996 编写于 作者: Z Zack M. Davis

explanatory error on `--print target-spec-json` without unstable options

Resolves #41683.
上级 9bbbd29e
...@@ -1615,8 +1615,15 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches) ...@@ -1615,8 +1615,15 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
"target-features" => PrintRequest::TargetFeatures, "target-features" => PrintRequest::TargetFeatures,
"relocation-models" => PrintRequest::RelocationModels, "relocation-models" => PrintRequest::RelocationModels,
"code-models" => PrintRequest::CodeModels, "code-models" => PrintRequest::CodeModels,
"target-spec-json" if nightly_options::is_unstable_enabled(matches) "target-spec-json" => {
=> PrintRequest::TargetSpec, if nightly_options::is_unstable_enabled(matches) {
PrintRequest::TargetSpec
} else {
early_error(error_format,
&format!("the `-Z unstable-options` flag must also be passed to \
enable the target-spec-json print option"));
}
},
req => { req => {
early_error(error_format, &format!("unknown print request `{}`", req)) early_error(error_format, &format!("unknown print request `{}`", req))
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册