Skip to content

Commit 9ec7aa2

Browse files
committed
Run rustfmt over type_check/mod.rs
1 parent ca26ef3 commit 9ec7aa2

File tree

1 file changed

+16
-13
lines changed
  • src/librustc_mir/borrow_check/nll/type_check

1 file changed

+16
-13
lines changed

src/librustc_mir/borrow_check/nll/type_check/mod.rs

+16-13
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
use borrow_check::nll::region_infer::Cause;
1515
use borrow_check::nll::region_infer::ClosureRegionRequirementsExt;
1616
use borrow_check::nll::universal_regions::UniversalRegions;
17+
use dataflow::move_paths::MoveData;
1718
use dataflow::FlowAtLocation;
1819
use dataflow::MaybeInitializedPlaces;
19-
use dataflow::move_paths::MoveData;
2020
use rustc::hir::def_id::DefId;
21-
use rustc::infer::{InferCtxt, InferOk, InferResult, LateBoundRegionConversionTime, UnitResult};
2221
use rustc::infer::region_constraints::{GenericKind, RegionConstraintData};
23-
use rustc::traits::{self, Normalized, TraitEngine};
22+
use rustc::infer::{InferCtxt, InferOk, InferResult, LateBoundRegionConversionTime, UnitResult};
23+
use rustc::mir::tcx::PlaceTy;
24+
use rustc::mir::visit::{PlaceContext, Visitor};
25+
use rustc::mir::*;
2426
use rustc::traits::query::NoSolution;
27+
use rustc::traits::{self, Normalized, TraitEngine};
2528
use rustc::ty::error::TypeError;
2629
use rustc::ty::fold::TypeFoldable;
2730
use rustc::ty::{self, ToPolyTraitRef, Ty, TyCtxt, TypeVariants};
28-
use rustc::mir::*;
29-
use rustc::mir::tcx::PlaceTy;
30-
use rustc::mir::visit::{PlaceContext, Visitor};
3131
use std::fmt;
3232
use syntax::ast;
3333
use syntax_pos::{Span, DUMMY_SP};
@@ -61,8 +61,8 @@ macro_rules! span_mirbug_and_err {
6161
})
6262
}
6363

64-
mod liveness;
6564
mod input_output;
65+
mod liveness;
6666

6767
/// Type checks the given `mir` in the context of the inference
6868
/// context `infcx`. Returns any region constraints that have yet to
@@ -763,9 +763,12 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
763763
}
764764
StatementKind::UserAssertTy(ref c_ty, ref local) => {
765765
let local_ty = mir.local_decls()[*local].ty;
766-
let (ty, _) = self.infcx.instantiate_canonical_with_fresh_inference_vars(
767-
stmt.source_info.span, c_ty);
768-
debug!("check_stmt: user_assert_ty ty={:?} local_ty={:?}", ty, local_ty);
766+
let (ty, _) = self.infcx
767+
.instantiate_canonical_with_fresh_inference_vars(stmt.source_info.span, c_ty);
768+
debug!(
769+
"check_stmt: user_assert_ty ty={:?} local_ty={:?}",
770+
ty, local_ty
771+
);
769772
if let Err(terr) = self.eq_types(ty, local_ty, location.at_self()) {
770773
span_mirbug!(
771774
self,
@@ -1513,9 +1516,9 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
15131516

15141517
fn prove_trait_ref(&mut self, trait_ref: ty::TraitRef<'tcx>, location: Location) {
15151518
self.prove_predicates(
1516-
&[
1517-
ty::Predicate::Trait(trait_ref.to_poly_trait_ref().to_poly_trait_predicate()),
1518-
],
1519+
&[ty::Predicate::Trait(
1520+
trait_ref.to_poly_trait_ref().to_poly_trait_predicate(),
1521+
)],
15191522
location,
15201523
);
15211524
}

0 commit comments

Comments
 (0)