Skip to content

Commit 54c4f94

Browse files
committed
Make some fatal errors more concise.
1 parent 2621f7f commit 54c4f94

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler/rustc_interface/src/interface.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ pub(crate) fn parse_cfg(dcx: &DiagCtxt, cfgs: Vec<String>) -> Cfg {
5454
($reason: expr) => {
5555
#[allow(rustc::untranslatable_diagnostic)]
5656
#[allow(rustc::diagnostic_outside_of_impl)]
57-
dcx.struct_fatal(format!(
57+
dcx.fatal(format!(
5858
concat!("invalid `--cfg` argument: `{}` (", $reason, ")"),
5959
s
60-
))
61-
.emit();
60+
));
6261
};
6362
}
6463

@@ -117,11 +116,10 @@ pub(crate) fn parse_check_cfg(dcx: &DiagCtxt, specs: Vec<String>) -> CheckCfg {
117116
($reason:expr) => {
118117
#[allow(rustc::untranslatable_diagnostic)]
119118
#[allow(rustc::diagnostic_outside_of_impl)]
120-
dcx.struct_fatal(format!(
119+
dcx.fatal(format!(
121120
concat!("invalid `--check-cfg` argument: `{}` (", $reason, ")"),
122121
s
123122
))
124-
.emit()
125123
};
126124
}
127125

0 commit comments

Comments
 (0)