From f3681f7a32ddb78db4d564769b50b697c54ebeac Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 2 Feb 2020 18:03:03 +0000 Subject: Tweak errors --- dhall/src/error/builder.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'dhall/src/error') 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 { -- cgit v1.2.3