use rustc::mir::{BasicBlock, Location, Body};
-use rustc_data_structures::indexed_vec::{Idx, IndexVec};
+use rustc_index::vec::{Idx, IndexVec};
/// Maps between a MIR Location, which identifies a particular
/// statement within a basic block, to a "rich location", which
statements_before_block: IndexVec<BasicBlock, usize>,
}
-newtype_index! {
+rustc_index::newtype_index! {
pub struct LocationIndex {
DEBUG_FORMAT = "LocationIndex({})"
}
}
impl LocationTable {
- crate fn new(mir: &Body<'_>) -> Self {
+ crate fn new(body: &Body<'_>) -> Self {
let mut num_points = 0;
- let statements_before_block = mir.basic_blocks()
+ let statements_before_block = body.basic_blocks()
.iter()
.map(|block_data| {
let v = num_points;