Skip to content

Commit 98d6fdb

Browse files
committed
make Borrows dataflow dumps about its loan domain
1 parent 38ea690 commit 98d6fdb

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

compiler/rustc_borrowck/src/dataflow.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::fmt;
2-
31
use rustc_data_structures::fx::FxIndexMap;
42
use rustc_data_structures::graph;
53
use rustc_index::bit_set::BitSet;
@@ -425,10 +423,6 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
425423
Borrows { tcx, body, borrow_set, borrows_out_of_scope_at_location }
426424
}
427425

428-
pub fn location(&self, idx: BorrowIndex) -> &Location {
429-
&self.borrow_set[idx].reserve_location
430-
}
431-
432426
/// Add all borrows to the kill set, if those borrows are out of scope at `location`.
433427
/// That means they went out of a nonlexical scope
434428
fn kill_loans_out_of_scope_at_location(
@@ -615,8 +609,4 @@ impl<'tcx> rustc_mir_dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
615609
}
616610
}
617611

618-
impl DebugWithContext<Borrows<'_, '_>> for BorrowIndex {
619-
fn fmt_with(&self, ctxt: &Borrows<'_, '_>, f: &mut fmt::Formatter<'_>) -> fmt::Result {
620-
write!(f, "{:?}", ctxt.location(*self))
621-
}
622-
}
612+
impl<C> DebugWithContext<C> for BorrowIndex {}

0 commit comments

Comments
 (0)