diff options
Diffstat (limited to 'compiler/rustc_hir/src/errors.rs')
-rw-r--r-- | compiler/rustc_hir/src/errors.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/errors.rs b/compiler/rustc_hir/src/errors.rs new file mode 100644 index 000000000..e593ed104 --- /dev/null +++ b/compiler/rustc_hir/src/errors.rs @@ -0,0 +1,10 @@ +use crate::LangItem; + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable)] +pub struct LangItemError(pub LangItem); + +impl ToString for LangItemError { + fn to_string(&self) -> String { + format!("requires `{}` lang_item", self.0.name()) + } +} |