1
Fork 0

Remove warnings/errors from compiler when using typeck_body in rustdoc span map builder

This commit is contained in:
Guillaume Gomez 2021-07-21 14:53:13 +02:00
parent 0799528db7
commit 5cf300d695
3 changed files with 25 additions and 6 deletions

View file

@ -500,6 +500,10 @@ impl Session {
&self.parse_sess.span_diagnostic
}
pub fn with_disabled_diagnostic<T, F: FnOnce() -> T>(&self, f: F) -> T {
self.parse_sess.span_diagnostic.with_disabled_diagnostic(f)
}
/// Analogous to calling methods on the given `DiagnosticBuilder`, but
/// deduplicates on lint ID, span (if any), and message for this `Session`
fn diag_once<'a, 'b>(