Change message type in bug functions.

From `impl Into<DiagnosticMessage>` to `impl Into<Cow<'static, str>>`.

Because these functions don't produce user-facing output and we don't
want their strings to be translated.
This commit is contained in:
Nicholas Nethercote 2024-02-21 14:51:59 +11:00
parent 80470d5ce8
commit 49c0b33862

View File

@ -1,5 +1,6 @@
//! Compute the binary representation of a type
use std::borrow::Cow;
use std::fmt;
use base_db::salsa::Cycle;
@ -114,8 +115,8 @@ struct LayoutCx<'a> {
impl<'a> LayoutCalculator for LayoutCx<'a> {
type TargetDataLayoutRef = &'a TargetDataLayout;
fn delayed_bug(&self, txt: String) {
never!("{}", txt);
fn delayed_bug(&self, txt: impl Into<Cow<'static, str>>) {
never!("{}", txt.into());
}
fn current_data_layout(&self) -> &'a TargetDataLayout {