}
}
-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,
// 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,
}
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>> {
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,
_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 };
//! 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};