Skip to content

Commit

Permalink
s/place_debug/place_pretty in SMIR
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval committed Mar 21, 2024
1 parent 5f62574 commit ebacf7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_smir/src/rustc_smir/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
id.internal(&mut *tables, tcx).0.stable(&mut *tables)
}

fn place_debug(&self, place: &Place) -> String {
fn place_pretty(&self, place: &Place) -> String {
let mut tables = self.0.borrow_mut();
let tcx = tables.tcx;
format!("{:?}", place.internal(&mut *tables, tcx))
Expand Down
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/compiler_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub trait Context {
fn layout_shape(&self, id: Layout) -> LayoutShape;

/// Get a debug string representation of a place.
fn place_debug(&self, place: &Place) -> String;
fn place_pretty(&self, place: &Place) -> String;
}

// A thread local variable that stores a pointer to the tables mapping between TyCtxt
Expand Down
2 changes: 1 addition & 1 deletion compiler/stable_mir/src/mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl Display for Ty {

impl Debug for Place {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
with(|ctx| write!(f, "{}", ctx.place_debug(self)))
with(|ctx| write!(f, "{}", ctx.place_pretty(self)))
}
}

Expand Down

0 comments on commit ebacf7a

Please sign in to comment.