diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-01 15:03:23 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-03 09:02:50 +1100 |
| commit | 54c4f9489642068e7e75094316deac9a36b25a2f (patch) | |
| tree | b8c0c6b29957e2118187ebfc72d9fa9a7036f18d /compiler/rustc_interface/src | |
| parent | 2621f7fd9ba97bbbd1b5b1df96184353948e2249 (diff) | |
| download | rust-54c4f9489642068e7e75094316deac9a36b25a2f.tar.gz rust-54c4f9489642068e7e75094316deac9a36b25a2f.zip | |
Make some fatal errors more concise.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 5ca88090996..e364d6624be 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -54,11 +54,10 @@ pub(crate) fn parse_cfg(dcx: &DiagCtxt, cfgs: Vec<String>) -> Cfg { ($reason: expr) => { #[allow(rustc::untranslatable_diagnostic)] #[allow(rustc::diagnostic_outside_of_impl)] - dcx.struct_fatal(format!( + dcx.fatal(format!( concat!("invalid `--cfg` argument: `{}` (", $reason, ")"), s - )) - .emit(); + )); }; } @@ -117,11 +116,10 @@ pub(crate) fn parse_check_cfg(dcx: &DiagCtxt, specs: Vec<String>) -> CheckCfg { ($reason:expr) => { #[allow(rustc::untranslatable_diagnostic)] #[allow(rustc::diagnostic_outside_of_impl)] - dcx.struct_fatal(format!( + dcx.fatal(format!( concat!("invalid `--check-cfg` argument: `{}` (", $reason, ")"), s )) - .emit() }; } |
