]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/util/elaborate_drops.rs
Auto merge of #62069 - Centril:rollup-m8n4uw7, r=Centril
[rust.git] / src / librustc_mir / util / elaborate_drops.rs
index 6da181ef66807006260b2cdb2aa924118d6657f2..91fc19b71d8ba7407d60619ba74b387091b5681a 100644 (file)
@@ -91,7 +91,8 @@ pub trait DropElaborator<'a, 'tcx>: fmt::Debug {
 
 #[derive(Debug)]
 struct DropCtxt<'l, 'b, 'tcx, D>
-    where D : DropElaborator<'b, 'tcx> + 'l
+where
+    D: DropElaborator<'b, 'tcx>,
 {
     elaborator: &'l mut D,
 
@@ -110,8 +111,10 @@ pub fn elaborate_drop<'b, 'tcx, 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
@@ -121,6 +124,7 @@ pub fn elaborate_drop<'b, 'tcx, D>(
 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