@@ -20,9 +20,9 @@ use dataflow::MaybeInitializedPlaces;
20
20
use rustc:: hir:: def_id:: DefId ;
21
21
use rustc:: infer:: region_constraints:: { GenericKind , RegionConstraintData } ;
22
22
use rustc:: infer:: { InferCtxt , InferOk , InferResult , LateBoundRegionConversionTime , UnitResult } ;
23
+ use rustc:: mir:: interpret:: EvalErrorKind :: BoundsCheck ;
23
24
use rustc:: mir:: tcx:: PlaceTy ;
24
25
use rustc:: mir:: visit:: { PlaceContext , Visitor } ;
25
- use rustc:: mir:: interpret:: EvalErrorKind :: BoundsCheck ;
26
26
use rustc:: mir:: * ;
27
27
use rustc:: traits:: query:: NoSolution ;
28
28
use rustc:: traits:: { self , Normalized , TraitEngine } ;
@@ -300,7 +300,8 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
300
300
301
301
debug ! ( "sanitize_constant: expected_ty={:?}" , expected_ty) ;
302
302
303
- if let Err ( terr) = self . cx
303
+ if let Err ( terr) = self
304
+ . cx
304
305
. eq_types ( expected_ty, constant. ty , location. at_self ( ) )
305
306
{
306
307
span_mirbug ! (
@@ -667,7 +668,7 @@ pub enum Locations {
667
668
/// NLL RFC, when you have a constraint `R1: R2 @ P`, this field
668
669
/// is the `P` value.
669
670
at_location : Location ,
670
- }
671
+ } ,
671
672
}
672
673
673
674
impl Locations {
@@ -721,7 +722,11 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
721
722
OP : FnOnce ( & mut Self ) -> InferResult < ' tcx , R > ,
722
723
{
723
724
if cfg ! ( debug_assertions) {
724
- info ! ( "fully_perform_op(describe_op={}) at {:?}" , describe_op( ) , locations) ;
725
+ info ! (
726
+ "fully_perform_op(describe_op={}) at {:?}" ,
727
+ describe_op( ) ,
728
+ locations
729
+ ) ;
725
730
}
726
731
727
732
let mut fulfill_cx = TraitEngine :: new ( self . infcx . tcx ) ;
@@ -845,7 +850,8 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
845
850
}
846
851
StatementKind :: UserAssertTy ( ref c_ty, ref local) => {
847
852
let local_ty = mir. local_decls ( ) [ * local] . ty ;
848
- let ( ty, _) = self . infcx
853
+ let ( ty, _) = self
854
+ . infcx
849
855
. instantiate_canonical_with_fresh_inference_vars ( stmt. source_info . span , c_ty) ;
850
856
debug ! (
851
857
"check_stmt: user_assert_ty ty={:?} local_ty={:?}" ,
@@ -1457,9 +1463,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
1457
1463
}
1458
1464
} ;
1459
1465
let operand_ty = operand. ty ( mir, tcx) ;
1460
- if let Err ( terr) =
1461
- self . sub_types ( operand_ty, field_ty, location. at_self ( ) )
1462
- {
1466
+ if let Err ( terr) = self . sub_types ( operand_ty, field_ty, location. at_self ( ) ) {
1463
1467
span_mirbug ! (
1464
1468
self ,
1465
1469
rvalue,
0 commit comments