Make some fatal errors more concise.
This commit is contained in:
parent
2621f7fd9b
commit
54c4f94896
@ -54,11 +54,10 @@ pub(crate) fn parse_cfg(dcx: &DiagCtxt, cfgs: Vec<String>) -> Cfg {
|
|||||||
($reason: expr) => {
|
($reason: expr) => {
|
||||||
#[allow(rustc::untranslatable_diagnostic)]
|
#[allow(rustc::untranslatable_diagnostic)]
|
||||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||||
dcx.struct_fatal(format!(
|
dcx.fatal(format!(
|
||||||
concat!("invalid `--cfg` argument: `{}` (", $reason, ")"),
|
concat!("invalid `--cfg` argument: `{}` (", $reason, ")"),
|
||||||
s
|
s
|
||||||
))
|
));
|
||||||
.emit();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,11 +116,10 @@ pub(crate) fn parse_check_cfg(dcx: &DiagCtxt, specs: Vec<String>) -> CheckCfg {
|
|||||||
($reason:expr) => {
|
($reason:expr) => {
|
||||||
#[allow(rustc::untranslatable_diagnostic)]
|
#[allow(rustc::untranslatable_diagnostic)]
|
||||||
#[allow(rustc::diagnostic_outside_of_impl)]
|
#[allow(rustc::diagnostic_outside_of_impl)]
|
||||||
dcx.struct_fatal(format!(
|
dcx.fatal(format!(
|
||||||
concat!("invalid `--check-cfg` argument: `{}` (", $reason, ")"),
|
concat!("invalid `--check-cfg` argument: `{}` (", $reason, ")"),
|
||||||
s
|
s
|
||||||
))
|
))
|
||||||
.emit()
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user