}
}
-pub trait DropElaborator<'a, 'tcx: 'a> : fmt::Debug {
+pub trait DropElaborator<'a, 'tcx>: fmt::Debug {
type Path : Copy + fmt::Debug;
fn patch(&mut self) -> &mut MirPatch<'tcx>;
fn body(&self) -> &'a Body<'tcx>;
- fn tcx(&self) -> TyCtxt<'a, 'tcx, 'tcx>;
+ fn tcx(&self) -> TyCtxt<'tcx>;
fn param_env(&self) -> ty::ParamEnv<'tcx>;
fn drop_style(&self, path: Self::Path, mode: DropFlagMode) -> DropStyle;
}
#[derive(Debug)]
-struct DropCtxt<'l, 'b: 'l, 'tcx: 'b, D>
- where D : DropElaborator<'b, 'tcx> + 'l
+struct DropCtxt<'l, 'b, 'tcx, D>
+where
+ D: DropElaborator<'b, 'tcx>,
{
elaborator: &'l mut D,
path: D::Path,
succ: BasicBlock,
unwind: Unwind,
- bb: BasicBlock)
- where D: DropElaborator<'b, 'tcx>
+ bb: BasicBlock,
+) where
+ D: DropElaborator<'b, 'tcx>,
+ 'tcx: 'b,
{
DropCtxt {
elaborator, source_info, place, path, succ, unwind
impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
where
D: DropElaborator<'b, 'tcx>,
+ 'tcx: 'b,
{
fn place_ty(&self, place: &Place<'tcx>) -> Ty<'tcx> {
place.ty(self.elaborator.body(), self.tcx()).ty
}
- fn tcx(&self) -> TyCtxt<'b, 'tcx, 'tcx> {
+ fn tcx(&self) -> TyCtxt<'tcx> {
self.elaborator.tcx()
}