Skip to content

Commit

Permalink
Don't downgrade NLL errors accepted by AST borrowck
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Aug 14, 2019
1 parent c43d03a commit 00d60a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use rustc::mir::{Terminator, TerminatorKind};
use rustc::ty::query::Providers;
use rustc::ty::{self, TyCtxt};

use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, Level};
use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder};
use rustc_data_structures::bit_set::BitSet;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::graph::dominators::Dominators;
Expand Down Expand Up @@ -407,7 +407,8 @@ fn do_mir_borrowck<'a, 'tcx>(
result
}

fn downgrade_if_error(diag: &mut Diagnostic) {
fn downgrade_if_error(_diag: &mut Diagnostic) {
/*
if diag.is_error() {
diag.level = Level::Warning;
diag.warn(
Expand All @@ -420,6 +421,7 @@ fn downgrade_if_error(diag: &mut Diagnostic) {
"for more information, try `rustc --explain E0729`"
);
}
*/
}

crate struct MirBorrowckCtxt<'cx, 'tcx> {
Expand Down

0 comments on commit 00d60a5

Please sign in to comment.