Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] NLL crater run 2: deny NLL warning lints in migrate mode #60914

Closed
wants to merge 1 commit into from
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