From a23e8a726c167cf806840d35c787240d4008d3d0 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 20 Jul 2018 17:29:29 +0200 Subject: Add `-Z borrowck=migrate` flag, use it to link NLL up to AST-borrowck. --- src/librustc_errors/diagnostic.rs | 19 +++++++++++++++++++ src/librustc_errors/diagnostic_builder.rs | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/librustc_errors') diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs index b1578b697bb..825e31539c8 100644 --- a/src/librustc_errors/diagnostic.rs +++ b/src/librustc_errors/diagnostic.rs @@ -99,6 +99,25 @@ impl Diagnostic { } } + pub fn is_error(&self) -> bool { + match self.level { + Level::Bug | + Level::Fatal | + Level::PhaseFatal | + Level::Error | + Level::FailureNote => { + true + } + + Level::Warning | + Level::Note | + Level::Help | + Level::Cancelled => { + false + } + } + } + /// Cancel the diagnostic (a structured diagnostic must either be emitted or /// canceled or it will panic when dropped). pub fn cancel(&mut self) { diff --git a/src/librustc_errors/diagnostic_builder.rs b/src/librustc_errors/diagnostic_builder.rs index 8f99ad87cb8..a0f3abda077 100644 --- a/src/librustc_errors/diagnostic_builder.rs +++ b/src/librustc_errors/diagnostic_builder.rs @@ -100,25 +100,6 @@ impl<'a> DiagnosticBuilder<'a> { buffered_diagnostics.push(diagnostic); } - pub fn is_error(&self) -> bool { - match self.level { - Level::Bug | - Level::Fatal | - Level::PhaseFatal | - Level::Error | - Level::FailureNote => { - true - } - - Level::Warning | - Level::Note | - Level::Help | - Level::Cancelled => { - false - } - } - } - /// Convenience function for internal use, clients should use one of the /// span_* methods instead. pub fn sub>( -- cgit 1.4.1-3-g733a5