@@ -20,9 +20,9 @@ use dataflow::MaybeInitializedPlaces;
2020use rustc:: hir:: def_id:: DefId ;
2121use rustc:: infer:: region_constraints:: { GenericKind , RegionConstraintData } ;
2222use rustc:: infer:: { InferCtxt , InferOk , InferResult , LateBoundRegionConversionTime , UnitResult } ;
23+ use rustc:: mir:: interpret:: EvalErrorKind :: BoundsCheck ;
2324use rustc:: mir:: tcx:: PlaceTy ;
2425use rustc:: mir:: visit:: { PlaceContext , Visitor } ;
25- use rustc:: mir:: interpret:: EvalErrorKind :: BoundsCheck ;
2626use rustc:: mir:: * ;
2727use rustc:: traits:: query:: NoSolution ;
2828use rustc:: traits:: { self , Normalized , TraitEngine } ;
@@ -300,7 +300,8 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
300300
301301 debug ! ( "sanitize_constant: expected_ty={:?}" , expected_ty) ;
302302
303- if let Err ( terr) = self . cx
303+ if let Err ( terr) = self
304+ . cx
304305 . eq_types ( expected_ty, constant. ty , location. at_self ( ) )
305306 {
306307 span_mirbug ! (
@@ -667,7 +668,7 @@ pub enum Locations {
667668 /// NLL RFC, when you have a constraint `R1: R2 @ P`, this field
668669 /// is the `P` value.
669670 at_location : Location ,
670- }
671+ } ,
671672}
672673
673674impl Locations {
@@ -721,7 +722,11 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
721722 OP : FnOnce ( & mut Self ) -> InferResult < ' tcx , R > ,
722723 {
723724 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+ ) ;
725730 }
726731
727732 let mut fulfill_cx = TraitEngine :: new ( self . infcx . tcx ) ;
@@ -845,7 +850,8 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
845850 }
846851 StatementKind :: UserAssertTy ( ref c_ty, ref local) => {
847852 let local_ty = mir. local_decls ( ) [ * local] . ty ;
848- let ( ty, _) = self . infcx
853+ let ( ty, _) = self
854+ . infcx
849855 . instantiate_canonical_with_fresh_inference_vars ( stmt. source_info . span , c_ty) ;
850856 debug ! (
851857 "check_stmt: user_assert_ty ty={:?} local_ty={:?}" ,
@@ -1457,9 +1463,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
14571463 }
14581464 } ;
14591465 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 ( ) ) {
14631467 span_mirbug ! (
14641468 self ,
14651469 rvalue,
0 commit comments