Rename {create,emit}_warning
as {create,emit}_warn
.
For consistency with `warn`/`struct_warn`, and also `{create,emit}_err`, all of which use an abbreviated form.
This commit is contained in:
parent
ff40ad4107
commit
3c4f1d85af
23 changed files with 55 additions and 56 deletions
|
@ -1016,7 +1016,7 @@ fn link_natively<'a>(
|
|||
if !prog.status.success() {
|
||||
let mut output = prog.stderr.clone();
|
||||
output.extend_from_slice(&prog.stdout);
|
||||
sess.dcx().emit_warning(errors::ProcessingDymutilFailed {
|
||||
sess.dcx().emit_warn(errors::ProcessingDymutilFailed {
|
||||
status: prog.status,
|
||||
output: escape_string(&output),
|
||||
});
|
||||
|
@ -1091,7 +1091,7 @@ fn strip_symbols_with_external_utility<'a>(
|
|||
if !prog.status.success() {
|
||||
let mut output = prog.stderr.clone();
|
||||
output.extend_from_slice(&prog.stdout);
|
||||
sess.dcx().emit_warning(errors::StrippingDebugInfoFailed {
|
||||
sess.dcx().emit_warn(errors::StrippingDebugInfoFailed {
|
||||
util,
|
||||
status: prog.status,
|
||||
output: escape_string(&output),
|
||||
|
@ -2406,7 +2406,7 @@ fn collect_natvis_visualizers(
|
|||
visualizer_paths.push(visualizer_out_file);
|
||||
}
|
||||
Err(error) => {
|
||||
sess.dcx().emit_warning(errors::UnableToWriteDebuggerVisualizer {
|
||||
sess.dcx().emit_warn(errors::UnableToWriteDebuggerVisualizer {
|
||||
path: visualizer_out_file,
|
||||
error,
|
||||
});
|
||||
|
|
|
@ -446,11 +446,11 @@ impl<'a> Linker for GccLinker<'a> {
|
|||
// FIXME(81490): ld64 doesn't support these flags but macOS 11
|
||||
// has -needed-l{} / -needed_library {}
|
||||
// but we have no way to detect that here.
|
||||
self.sess.dcx().emit_warning(errors::Ld64UnimplementedModifier);
|
||||
self.sess.dcx().emit_warn(errors::Ld64UnimplementedModifier);
|
||||
} else if self.is_gnu && !self.sess.target.is_like_windows {
|
||||
self.linker_arg("--no-as-needed");
|
||||
} else {
|
||||
self.sess.dcx().emit_warning(errors::LinkerUnsupportedModifier);
|
||||
self.sess.dcx().emit_warn(errors::LinkerUnsupportedModifier);
|
||||
}
|
||||
}
|
||||
self.hint_dynamic();
|
||||
|
@ -504,7 +504,7 @@ impl<'a> Linker for GccLinker<'a> {
|
|||
// FIXME(81490): ld64 as of macOS 11 supports the -needed_framework
|
||||
// flag but we have no way to detect that here.
|
||||
// self.cmd.arg("-needed_framework").arg(framework);
|
||||
self.sess.dcx().emit_warning(errors::Ld64UnimplementedModifier);
|
||||
self.sess.dcx().emit_warn(errors::Ld64UnimplementedModifier);
|
||||
}
|
||||
self.cmd.arg("-framework").arg(framework);
|
||||
}
|
||||
|
@ -950,7 +950,7 @@ impl<'a> Linker for MsvcLinker<'a> {
|
|||
}
|
||||
}
|
||||
Err(error) => {
|
||||
self.sess.dcx().emit_warning(errors::NoNatvisDirectory { error });
|
||||
self.sess.dcx().emit_warn(errors::NoNatvisDirectory { error });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1501,7 +1501,7 @@ impl<'a> Linker for L4Bender<'a> {
|
|||
|
||||
fn export_symbols(&mut self, _: &Path, _: CrateType, _: &[String]) {
|
||||
// ToDo, not implemented, copy from GCC
|
||||
self.sess.dcx().emit_warning(errors::L4BenderExportingSymbolsUnimplemented);
|
||||
self.sess.dcx().emit_warn(errors::L4BenderExportingSymbolsUnimplemented);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -573,11 +573,11 @@ fn produce_final_output_artifacts(
|
|||
if crate_output.outputs.contains_key(&output_type) {
|
||||
// 2) Multiple codegen units, with `--emit foo=some_name`. We have
|
||||
// no good solution for this case, so warn the user.
|
||||
sess.dcx().emit_warning(errors::IgnoringEmitPath { extension });
|
||||
sess.dcx().emit_warn(errors::IgnoringEmitPath { extension });
|
||||
} else if crate_output.single_output_file.is_some() {
|
||||
// 3) Multiple codegen units, with `-o some_name`. We have
|
||||
// no good solution for this case, so warn the user.
|
||||
sess.dcx().emit_warning(errors::IgnoringOutput { extension });
|
||||
sess.dcx().emit_warn(errors::IgnoringOutput { extension });
|
||||
} else {
|
||||
// 4) Multiple codegen units, but no explicit name. We
|
||||
// just leave the `foo.0.x` files in place.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue