diff options
author | Nadrieril | 2020-02-02 18:03:03 +0000 |
---|---|---|
committer | Nadrieril | 2020-02-02 18:03:03 +0000 |
commit | f3681f7a32ddb78db4d564769b50b697c54ebeac (patch) | |
tree | a65cf1d2a53d67d2ea8f808c9a8408a8f96713e7 /dhall/src/error | |
parent | b6625eccbf3f2d1bcfe1a88f4d556439281e91de (diff) |
Tweak errors
Diffstat (limited to 'dhall/src/error')
-rw-r--r-- | dhall/src/error/builder.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/dhall/src/error/builder.rs b/dhall/src/error/builder.rs index 8c7eef3..39f8dfb 100644 --- a/dhall/src/error/builder.rs +++ b/dhall/src/error/builder.rs @@ -63,12 +63,6 @@ impl ErrorBuilder { consumed: false, } } - pub fn new_span_err(span: Span, message: impl ToString) -> Self { - let message = message.to_string(); - let mut builder = Self::new(message.clone()); - builder.span_err(span, message); - builder - } pub fn span_annot( &mut self, @@ -117,6 +111,9 @@ impl ErrorBuilder { pub fn help(&mut self, message: impl ToString) -> &mut Self { self.footer_annot(message, AnnotationType::Help) } + pub fn note(&mut self, message: impl ToString) -> &mut Self { + self.footer_annot(message, AnnotationType::Note) + } // TODO: handle multiple files pub fn format(&mut self) -> String { |