diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-01 19:18:25 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-03 09:02:50 +1100 |
| commit | 8ba25d0989f8d96cbcb4365fc61b469575e22d63 (patch) | |
| tree | b6bcf302daeef503c4688dd61c5a35eeae469e3f /compiler/rustc_interface/src | |
| parent | a9a2e1565abbeae741d6d715224194caf500099b (diff) | |
| download | rust-8ba25d0989f8d96cbcb4365fc61b469575e22d63.tar.gz rust-8ba25d0989f8d96cbcb4365fc61b469575e22d63.zip | |
`SilentEmitter::fatal_note` doesn't need to be optional.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index e364d6624be..8a4705e0056 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -45,9 +45,9 @@ pub struct Compiler { pub(crate) fn parse_cfg(dcx: &DiagCtxt, cfgs: Vec<String>) -> Cfg { cfgs.into_iter() .map(|s| { - let sess = ParseSess::with_silent_emitter(Some(format!( + let sess = ParseSess::with_silent_emitter(format!( "this error occurred on the command line: `--cfg={s}`" - ))); + )); let filename = FileName::cfg_spec_source_code(&s); macro_rules! error { @@ -107,9 +107,9 @@ pub(crate) fn parse_check_cfg(dcx: &DiagCtxt, specs: Vec<String>) -> CheckCfg { let mut check_cfg = CheckCfg { exhaustive_names, exhaustive_values, ..CheckCfg::default() }; for s in specs { - let sess = ParseSess::with_silent_emitter(Some(format!( + let sess = ParseSess::with_silent_emitter(format!( "this error occurred on the command line: `--check-cfg={s}`" - ))); + )); let filename = FileName::cfg_spec_source_code(&s); macro_rules! error { |
