]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/nll/type_check/mod.rs
Various minor/cosmetic improvements to code
[rust.git] / src / librustc_mir / borrow_check / nll / type_check / mod.rs
index 06dfd4bc2cc1fc7ac567e023feac1b2bea0bdca2..4807abe2bdd19c08dbedbb476ad9b884c2e3311c 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 //! This pass type-checks the MIR to ensure it is not broken.
+
 #![allow(unreachable_code)]
 
 use borrow_check::borrow_set::BorrowSet;
@@ -777,7 +778,7 @@ impl MirTypeckRegionConstraints<'tcx> {
     fn placeholder_region(
         &mut self,
         infcx: &InferCtxt<'_, '_, 'tcx>,
-        placeholder: ty::Placeholder,
+        placeholder: ty::PlaceholderRegion,
     ) -> ty::Region<'tcx> {
         let placeholder_index = self.placeholder_indices.insert(placeholder);
         match self.placeholder_index_to_region.get(placeholder_index) {
@@ -1314,7 +1315,6 @@ fn check_stmt(&mut self, mir: &Mir<'tcx>, stmt: &Statement<'tcx>, location: Loca
             | StatementKind::StorageLive(..)
             | StatementKind::StorageDead(..)
             | StatementKind::InlineAsm { .. }
-            | StatementKind::EndRegion(_)
             | StatementKind::Retag { .. }
             | StatementKind::EscapeToRaw { .. }
             | StatementKind::Nop => {}
@@ -1468,7 +1468,7 @@ fn check_terminator(
                             value_ty,
                             ty,
                             term_location.to_locations(),
-                            ConstraintCategory::Return,
+                            ConstraintCategory::Yield,
                         ) {
                             span_mirbug!(
                                 self,