Skip to content

Commit aafc8ca

Browse files
jhprattMuscraft
authored andcommitted
Rollup merge of rust-lang#144162 - beepster4096:drop_elaborator_debug_impls, r=compiler-errors
Debug impls for DropElaborators It's a little weird that these just have a completely empty Debug impl. Now they're `ElaborateDropsCtxt { .. }` and `DropShimElaborator { .. }`.
2 parents bd66e7c + fced167 commit aafc8ca

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)