@@ -17,7 +17,7 @@ use rustc::mir::{Terminator, TerminatorKind};
1717use rustc:: ty:: query:: Providers ;
1818use rustc:: ty:: { self , TyCtxt } ;
1919
20- use rustc_errors:: { Applicability , Diagnostic , DiagnosticBuilder , Level } ;
20+ use rustc_errors:: { Applicability , Diagnostic , DiagnosticBuilder } ;
2121use rustc_data_structures:: bit_set:: BitSet ;
2222use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
2323use rustc_data_structures:: graph:: dominators:: Dominators ;
@@ -433,18 +433,18 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
433433 result
434434}
435435
436- fn downgrade_if_error ( diag : & mut Diagnostic ) {
437- if diag. is_error ( ) {
438- diag. level = Level :: Warning ;
439- diag. warn (
440- "this error has been downgraded to a warning for backwards \
441- compatibility with previous releases",
442- ) ;
443- diag. warn (
444- "this represents potential undefined behavior in your code and \
445- this warning will become a hard error in the future",
446- ) ;
447- }
436+ fn downgrade_if_error ( _diag : & mut Diagnostic ) {
437+ // if diag.is_error() {
438+ // diag.level = Level::Warning;
439+ // diag.warn(
440+ // "this error has been downgraded to a warning for backwards \
441+ // compatibility with previous releases",
442+ // );
443+ // diag.warn(
444+ // "this represents potential undefined behavior in your code and \
445+ // this warning will become a hard error in the future",
446+ // );
447+ // }
448448}
449449
450450pub struct MirBorrowckCtxt < ' cx , ' gcx : ' tcx , ' tcx : ' cx > {
0 commit comments