Use translatable diagnostics in rustc_const_eval
This commit is contained in:
parent
642c92e630
commit
4f83717cf7
93 changed files with 2375 additions and 1123 deletions
|
@ -2,7 +2,6 @@ use crate::abi::{self, Abi, Align, FieldsShape, Size};
|
|||
use crate::abi::{HasDataLayout, TyAbiInterface, TyAndLayout};
|
||||
use crate::spec::{self, HasTargetSpec};
|
||||
use rustc_span::Symbol;
|
||||
use std::fmt;
|
||||
use std::str::FromStr;
|
||||
|
||||
mod aarch64;
|
||||
|
@ -633,16 +632,6 @@ pub enum AdjustForForeignAbiError {
|
|||
Unsupported { arch: Symbol, abi: spec::abi::Abi },
|
||||
}
|
||||
|
||||
impl fmt::Display for AdjustForForeignAbiError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Self::Unsupported { arch, abi } => {
|
||||
write!(f, "target architecture {arch:?} does not support `extern {abi}` ABI")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Ty> FnAbi<'a, Ty> {
|
||||
pub fn adjust_for_foreign_abi<C>(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue