diff options
| author | Celina G. Val <celinval@amazon.com> | 2024-02-29 15:23:44 -0800 |
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2024-03-01 11:02:05 -0800 |
| commit | e3ac2c68b89c95e01440c1ab5fc7897e93a35c41 (patch) | |
| tree | bf2008aeee1de7b4df1687b4aba12b651641294e /compiler/stable_mir/src/error.rs | |
| parent | 6db96de66c2c0ea3f4f2f348ed1a83c2c507687d (diff) | |
| download | rust-e3ac2c68b89c95e01440c1ab5fc7897e93a35c41.tar.gz rust-e3ac2c68b89c95e01440c1ab5fc7897e93a35c41.zip | |
Implement missing ABI structures in StableMIR
Diffstat (limited to 'compiler/stable_mir/src/error.rs')
| -rw-r--r-- | compiler/stable_mir/src/error.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/stable_mir/src/error.rs b/compiler/stable_mir/src/error.rs index 9e3f4936944..050752e41eb 100644 --- a/compiler/stable_mir/src/error.rs +++ b/compiler/stable_mir/src/error.rs @@ -5,12 +5,14 @@ //! - [Error]: Generic error that represents the reason why a request that could not be fulfilled. use std::fmt::{Debug, Display, Formatter}; -use std::{error, fmt, io}; +use std::{fmt, io}; macro_rules! error { ($fmt: literal $(,)?) => { Error(format!($fmt)) }; ($fmt: literal, $($arg:tt)*) => { Error(format!($fmt, $($arg)*)) }; - } +} + +pub(crate) use error; /// An error type used to represent an error that has already been reported by the compiler. #[derive(Clone, Copy, PartialEq, Eq)] @@ -72,8 +74,9 @@ where } } -impl error::Error for Error {} -impl<T> error::Error for CompilerError<T> where T: Display + Debug {} +impl std::error::Error for Error {} + +impl<T> std::error::Error for CompilerError<T> where T: Display + Debug {} impl From<io::Error> for Error { fn from(value: io::Error) -> Self { |
