@@ -17,7 +17,7 @@ use rustc::mir::{Terminator, TerminatorKind};
17
17
use rustc:: ty:: query:: Providers ;
18
18
use rustc:: ty:: { self , TyCtxt } ;
19
19
20
- use rustc_errors:: { Applicability , Diagnostic , DiagnosticBuilder , Level } ;
20
+ use rustc_errors:: { Applicability , Diagnostic , DiagnosticBuilder } ;
21
21
use rustc_data_structures:: bit_set:: BitSet ;
22
22
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
23
23
use rustc_data_structures:: graph:: dominators:: Dominators ;
@@ -433,18 +433,18 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
433
433
result
434
434
}
435
435
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
+ // }
448
448
}
449
449
450
450
pub struct MirBorrowckCtxt < ' cx , ' gcx : ' tcx , ' tcx : ' cx > {
0 commit comments