diff options
| author | bors <bors@rust-lang.org> | 2024-01-10 18:03:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-10 18:03:53 +0000 |
| commit | a2d9d73e608f1b24eba840c4fd2d68dbe3b65e01 (patch) | |
| tree | 42523e01769059455f89af632b53b841b1401d69 /compiler/rustc_interface/src/util.rs | |
| parent | e9271846294c4ee5bd7706df68180320c0b5ff20 (diff) | |
| parent | 700a3965202f4f403956fcce744ce5ba6adf2ddb (diff) | |
| download | rust-a2d9d73e608f1b24eba840c4fd2d68dbe3b65e01.tar.gz rust-a2d9d73e608f1b24eba840c4fd2d68dbe3b65e01.zip | |
Auto merge of #119751 - nnethercote:error-api-fixes, r=oli-obk
Diagnostic API fixes Some improvements to diagnostic APIs: improve some naming, use shortcuts in more places, and add a couple of missing methods. r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_interface/src/util.rs')
| -rw-r--r-- | compiler/rustc_interface/src/util.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 92a6445ed09..9fd44e46b31 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -431,7 +431,7 @@ pub fn collect_crate_types(session: &Session, attrs: &[ast::Attribute]) -> Vec<C base.retain(|crate_type| { if output::invalid_output_for_target(session, *crate_type) { - session.dcx().emit_warning(errors::UnsupportedCrateTypeForTarget { + session.dcx().emit_warn(errors::UnsupportedCrateTypeForTarget { crate_type: *crate_type, target_triple: &session.opts.target_triple, }); @@ -507,16 +507,16 @@ pub fn build_output_filenames(attrs: &[ast::Attribute], sess: &Session) -> Outpu let unnamed_output_types = sess.opts.output_types.values().filter(|a| a.is_none()).count(); let ofile = if unnamed_output_types > 1 { - sess.dcx().emit_warning(errors::MultipleOutputTypesAdaption); + sess.dcx().emit_warn(errors::MultipleOutputTypesAdaption); None } else { if !sess.opts.cg.extra_filename.is_empty() { - sess.dcx().emit_warning(errors::IgnoringExtraFilename); + sess.dcx().emit_warn(errors::IgnoringExtraFilename); } Some(out_file.clone()) }; if sess.io.output_dir != None { - sess.dcx().emit_warning(errors::IgnoringOutDir); + sess.dcx().emit_warn(errors::IgnoringOutDir); } let out_filestem = |
