// 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;
/// - `liveness` -- results of a liveness computation on the MIR; used to create liveness
/// constraints for the regions in the types of variables
/// - `flow_inits` -- results of a maybe-init dataflow analysis
-/// - `move_data` -- move-data constructed when performing the maybe-init dataflow analysiss
+/// - `move_data` -- move-data constructed when performing the maybe-init dataflow analysis
pub(crate) fn type_check<'gcx, 'tcx>(
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
param_env: ty::ParamEnv<'gcx>,
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) {
| StatementKind::StorageLive(..)
| StatementKind::StorageDead(..)
| StatementKind::InlineAsm { .. }
- | StatementKind::EndRegion(_)
| StatementKind::Retag { .. }
| StatementKind::EscapeToRaw { .. }
| StatementKind::Nop => {}
value_ty,
ty,
term_location.to_locations(),
- ConstraintCategory::Return,
+ ConstraintCategory::Yield,
) {
span_mirbug!(
self,