mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-08 11:18:48 +00:00
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:
parent
7ae3bd0477
commit
89f5cf66b2
1 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue