Add -Z borrowck=migrate
flag, use it to link NLL up to AST-borrowck.
This commit is contained in:
parent
655894baf9
commit
a23e8a726c
6 changed files with 66 additions and 23 deletions
|
@ -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) {
|
||||
|
|
|
@ -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<S: Into<MultiSpan>>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue