Skip to content

Commit 2a03750

Browse files
committed
debug impls for drop elaborators
1 parent 8f08b3a commit 2a03750

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_mir_transform/src/elaborate_drops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ struct ElaborateDropsCtxt<'a, 'tcx> {
253253
}
254254

255255
impl fmt::Debug for ElaborateDropsCtxt<'_, '_> {
256-
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
257-
Ok(())
256+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
257+
f.debug_struct("ElaborateDropsCtxt").finish_non_exhaustive()
258258
}
259259
}
260260

compiler/rustc_mir_transform/src/shim.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ pub(super) struct DropShimElaborator<'a, 'tcx> {
434434
}
435435

436436
impl fmt::Debug for DropShimElaborator<'_, '_> {
437-
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
438-
Ok(())
437+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
438+
f.debug_struct("DropShimElaborator").finish_non_exhaustive()
439439
}
440440
}
441441

0 commit comments

Comments
 (0)