diff options
author | Nadrieril | 2020-03-18 18:58:51 +0000 |
---|---|---|
committer | Nadrieril | 2020-03-31 21:44:01 +0100 |
commit | 7848c8e8d3147ebe428290558aa6c0efcbf59ee5 (patch) | |
tree | be25355f0fabf6bc5f9b0568e224795058f069a6 /dhall/src/error | |
parent | 844dc3defdd7735742ad41eb6d1da8fe2e7f340b (diff) |
Brutally make all of dhall pub
Diffstat (limited to '')
-rw-r--r-- | dhall/src/error/builder.rs | 2 | ||||
-rw-r--r-- | dhall/src/error/mod.rs | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/dhall/src/error/builder.rs b/dhall/src/error/builder.rs index c0bacb5..3ee65fb 100644 --- a/dhall/src/error/builder.rs +++ b/dhall/src/error/builder.rs @@ -6,7 +6,7 @@ use annotate_snippets::{ use crate::syntax::{ParsedSpan, Span}; #[derive(Debug, Clone, Default)] -pub(crate) struct ErrorBuilder { +pub struct ErrorBuilder { title: FreeAnnotation, annotations: Vec<SpannedAnnotation>, footer: Vec<FreeAnnotation>, diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs index e28b98b..ef4d41f 100644 --- a/dhall/src/error/mod.rs +++ b/dhall/src/error/mod.rs @@ -4,7 +4,7 @@ use crate::semantics::resolve::{ImportLocation, ImportStack}; use crate::syntax::{Import, ParseError}; mod builder; -pub(crate) use builder::*; +pub use builder::*; pub type Result<T> = std::result::Result<T, Error>; @@ -15,7 +15,7 @@ pub struct Error { #[derive(Debug)] #[non_exhaustive] -pub(crate) enum ErrorKind { +pub enum ErrorKind { IO(IOError), Parse(ParseError), Decode(DecodeError), @@ -25,7 +25,7 @@ pub(crate) enum ErrorKind { } #[derive(Debug)] -pub(crate) enum ImportError { +pub enum ImportError { Missing, MissingEnvVar, SanityCheck, @@ -53,21 +53,21 @@ pub struct TypeError { /// The specific type error #[derive(Debug)] -pub(crate) enum TypeMessage { +pub enum TypeMessage { Custom(String), } impl Error { - pub(crate) fn new(kind: ErrorKind) -> Self { + pub fn new(kind: ErrorKind) -> Self { Error { kind } } - pub(crate) fn kind(&self) -> &ErrorKind { + pub fn kind(&self) -> &ErrorKind { &self.kind } } impl TypeError { - pub(crate) fn new(message: TypeMessage) -> Self { + pub fn new(message: TypeMessage) -> Self { TypeError { message } } } |