]> git.lizzy.rs Git - rust.git/commitdiff
please the tidy
authorRalf Jung <post@ralfj.de>
Sat, 22 Jul 2017 08:04:16 +0000 (01:04 -0700)
committerRalf Jung <post@ralfj.de>
Sun, 30 Jul 2017 08:11:59 +0000 (01:11 -0700)
src/librustc/ich/impls_mir.rs
src/librustc/mir/mod.rs
src/librustc_mir/transform/add_validation.rs
src/librustc_mir/transform/clean_end_regions.rs
src/librustc_mir/transform/erase_regions.rs

index bef35fdc2578cf3b390b54c78be18b701437c990..c20864183f47a0cf774efa72fa78d875f142a83f 100644 (file)
@@ -243,7 +243,8 @@ fn hash_stable<W: StableHasherResult>(&self,
     }
 }
 
-impl<'a, 'gcx, 'tcx, T> HashStable<StableHashingContext<'a, 'gcx, 'tcx>> for mir::ValidationOperand<'tcx, T>
+impl<'a, 'gcx, 'tcx, T> HashStable<StableHashingContext<'a, 'gcx, 'tcx>>
+    for mir::ValidationOperand<'tcx, T>
     where T: HashStable<StableHashingContext<'a, 'gcx, 'tcx>>
 {
     fn hash_stable<W: StableHasherResult>(&self,
index f8261f806296e97e3e320de9c5bbe68815b72333..3ee86dbdc846951f203682e158f685065618f6ca 100644 (file)
@@ -1596,7 +1596,8 @@ fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool {
             // trait with a `fn visit_extent`.
             EndRegion(ref _extent) => false,
 
-            Validate(ref _op, ref lvalues) => lvalues.iter().any(|ty_and_lvalue| ty_and_lvalue.visit_with(visitor)),
+            Validate(ref _op, ref lvalues) =>
+                lvalues.iter().any(|ty_and_lvalue| ty_and_lvalue.visit_with(visitor)),
 
             Nop => false,
         }
index e400683e8b4e1eef96cdf2aea05e5ee808773baf..d91db41d20d33191a6a60d64013d479619b13044 100644 (file)
@@ -89,7 +89,7 @@ fn run_pass<'a, 'tcx>(&self,
             return;
         }
 
-        let local_decls = mir.local_decls.clone(); // TODO: Find a way to get rid of this clone.
+        let local_decls = mir.local_decls.clone(); // FIXME: Find a way to get rid of this clone.
 
         /// Convert an lvalue to a validation operand.
         let lval_to_operand = |lval: Lvalue<'tcx>| -> ValidationOperand<'tcx, Lvalue<'tcx>> {
@@ -104,7 +104,7 @@ fn run_pass<'a, 'tcx>(&self,
             let acquire_stmt = Statement {
                 source_info: SourceInfo {
                     scope: ARGUMENT_VISIBILITY_SCOPE,
-                    span: mir.span, // TODO: Consider using just the span covering the function
+                    span: mir.span, // FIXME: Consider using just the span covering the function
                                     // argument declaration.
                 },
                 kind: StatementKind::Validate(ValidationOp::Acquire,
index 28311a5e68cce1a5e1e2fe2a6624b807730e2b42..1a31bf975307caf47430b8683d6c4fc91be4ace4 100644 (file)
@@ -43,7 +43,10 @@ fn run_pass<'a, 'tcx>(&self,
                           _tcx: TyCtxt<'a, 'tcx, 'tcx>,
                           _source: MirSource,
                           mir: &mut Mir<'tcx>) {
-        let mut gather = GatherBorrowedRegions { seen_regions: FxHashSet(), in_validation_statement: false };
+        let mut gather = GatherBorrowedRegions {
+            seen_regions: FxHashSet(),
+            in_validation_statement: false
+        };
         gather.visit_mir(mir);
 
         let mut delete = DeleteTrivialEndRegions { seen_regions: &mut gather.seen_regions };
index 05376ff3d52692487bffa0f2fc9a9c04d7a17517..f01d71fde2648af2d0b144a3ac45ec7a217f40d2 100644 (file)
@@ -11,8 +11,8 @@
 //! This pass erases all early-bound regions from the types occuring in the MIR.
 //! We want to do this once just before trans, so trans does not have to take
 //! care erasing regions all over the place.
-//! NOTE:  We do NOT erase regions of statements that are relevant for "types-as-contracts"-validation,
-//! namely, AcquireValid, ReleaseValid, and EndRegion.
+//! NOTE:  We do NOT erase regions of statements that are relevant for
+//! "types-as-contracts"-validation, namely, AcquireValid, ReleaseValid, and EndRegion.
 
 use rustc::ty::subst::Substs;
 use rustc::ty::{Ty, TyCtxt, ClosureSubsts};