1
Fork 0

add and use struct_help

This commit is contained in:
Mark Mansi 2019-10-03 18:14:25 -05:00
parent 89a184a399
commit 19122ab981
2 changed files with 21 additions and 21 deletions

View file

@ -619,6 +619,11 @@ impl Handler {
DiagnosticBuilder::new(self, Level::Fatal, msg)
}
/// Construct a builder at the `Help` level with the `msg`.
pub fn struct_help(&self, msg: &str) -> DiagnosticBuilder<'_> {
DiagnosticBuilder::new(self, Level::Help, msg)
}
pub fn span_fatal(&self, span: impl Into<MultiSpan>, msg: &str) -> FatalError {
self.emit_diag_at_span(Diagnostic::new(Fatal, msg), span);
FatalError