diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-10-01 23:55:55 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-10-02 00:30:50 +0000 |
| commit | 98d6fdb24206f632e0f151719bbdcc73ff67ff2d (patch) | |
| tree | 5ba45207af5d1dbb8136a753e45e0de1badd9f4a | |
| parent | 38ea690363e24acf4970b2a7e942af6c05893691 (diff) | |
| download | rust-98d6fdb24206f632e0f151719bbdcc73ff67ff2d.tar.gz rust-98d6fdb24206f632e0f151719bbdcc73ff67ff2d.zip | |
make `Borrows` dataflow dumps about its loan domain
| -rw-r--r-- | compiler/rustc_borrowck/src/dataflow.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/compiler/rustc_borrowck/src/dataflow.rs b/compiler/rustc_borrowck/src/dataflow.rs index 4af5a10f581..5ea48d3fc7e 100644 --- a/compiler/rustc_borrowck/src/dataflow.rs +++ b/compiler/rustc_borrowck/src/dataflow.rs @@ -1,5 +1,3 @@ -use std::fmt; - use rustc_data_structures::fx::FxIndexMap; use rustc_data_structures::graph; use rustc_index::bit_set::BitSet; @@ -425,10 +423,6 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> { Borrows { tcx, body, borrow_set, borrows_out_of_scope_at_location } } - pub fn location(&self, idx: BorrowIndex) -> &Location { - &self.borrow_set[idx].reserve_location - } - /// Add all borrows to the kill set, if those borrows are out of scope at `location`. /// That means they went out of a nonlexical scope fn kill_loans_out_of_scope_at_location( @@ -615,8 +609,4 @@ impl<'tcx> rustc_mir_dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> { } } -impl DebugWithContext<Borrows<'_, '_>> for BorrowIndex { - fn fmt_with(&self, ctxt: &Borrows<'_, '_>, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{:?}", ctxt.location(*self)) - } -} +impl<C> DebugWithContext<C> for BorrowIndex {} |
