frontend 0.4.1

rustc's frontend with no LLVM and no std: parsing through MIR, as a library
1
2
3
4
5
6
7
8
9
10
11
12
use alloc::string::String;

#[derive(Eq, PartialEq, Debug)]
pub(crate) struct Error(pub String);

// `core::error::Error` since 1.81, so this survives the no_std conversion.
impl core::error::Error for Error {}
impl core::fmt::Display for Error {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "{}", self.0)
    }
}