Skip to content

Commit 00d60a5

Browse files
committed
Don't downgrade NLL errors accepted by AST borrowck
1 parent c43d03a commit 00d60a5

File tree

1 file changed

+4
-2
lines changed
  • src/librustc_mir/borrow_check

1 file changed

+4
-2
lines changed

src/librustc_mir/borrow_check/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc::mir::{Terminator, TerminatorKind};
1818
use rustc::ty::query::Providers;
1919
use rustc::ty::{self, TyCtxt};
2020

21-
use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, Level};
21+
use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder};
2222
use rustc_data_structures::bit_set::BitSet;
2323
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
2424
use rustc_data_structures::graph::dominators::Dominators;
@@ -407,7 +407,8 @@ fn do_mir_borrowck<'a, 'tcx>(
407407
result
408408
}
409409

410-
fn downgrade_if_error(diag: &mut Diagnostic) {
410+
fn downgrade_if_error(_diag: &mut Diagnostic) {
411+
/*
411412
if diag.is_error() {
412413
diag.level = Level::Warning;
413414
diag.warn(
@@ -420,6 +421,7 @@ fn downgrade_if_error(diag: &mut Diagnostic) {
420421
"for more information, try `rustc --explain E0729`"
421422
);
422423
}
424+
*/
423425
}
424426

425427
crate struct MirBorrowckCtxt<'cx, 'tcx> {

0 commit comments

Comments
 (0)