Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 @@ -433,18 +433,18 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
result
}

fn downgrade_if_error(diag: &mut Diagnostic) {
if diag.is_error() {
diag.level = Level::Warning;
diag.warn(
"this error has been downgraded to a warning for backwards \
compatibility with previous releases",
);
diag.warn(
"this represents potential undefined behavior in your code and \
this warning will become a hard error in the future",
);
}
fn downgrade_if_error(_diag: &mut Diagnostic) {
// if diag.is_error() {
// diag.level = Level::Warning;
// diag.warn(
// "this error has been downgraded to a warning for backwards \
// compatibility with previous releases",
// );
// diag.warn(
// "this represents potential undefined behavior in your code and \
// this warning will become a hard error in the future",
// );
// }
}

pub struct MirBorrowckCtxt<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
Expand Down