Skip to content

Commit 1779252

Browse files
committed
Some tracing cleanups
1 parent 61efe9d commit 1779252

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_mir_dataflow/src/elaborate_drops.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ where
194194
D: DropElaborator<'b, 'tcx>,
195195
'tcx: 'b,
196196
{
197+
#[instrument(level = "trace", skip(self), ret)]
197198
fn place_ty(&self, place: Place<'tcx>) -> Ty<'tcx> {
198199
place.ty(self.elaborator.body(), self.tcx()).ty
199200
}
@@ -220,11 +221,9 @@ where
220221
//
221222
// FIXME: I think we should just control the flags externally,
222223
// and then we do not need this machinery.
224+
#[instrument(level = "debug")]
223225
pub fn elaborate_drop(&mut self, bb: BasicBlock) {
224-
debug!("elaborate_drop({:?}, {:?})", bb, self);
225-
let style = self.elaborator.drop_style(self.path, DropFlagMode::Deep);
226-
debug!("elaborate_drop({:?}, {:?}): live - {:?}", bb, self, style);
227-
match style {
226+
match self.elaborator.drop_style(self.path, DropFlagMode::Deep) {
228227
DropStyle::Dead => {
229228
self.elaborator
230229
.patch()

compiler/rustc_mir_transform/src/elaborate_drops.rs

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ impl<'a, 'tcx> DropElaborator<'a, 'tcx> for Elaborator<'a, '_, 'tcx> {
170170
self.ctxt.param_env()
171171
}
172172

173+
#[instrument(level = "debug", skip(self), ret)]
173174
fn drop_style(&self, path: Self::Path, mode: DropFlagMode) -> DropStyle {
174175
let ((maybe_live, maybe_dead), multipart) = match mode {
175176
DropFlagMode::Shallow => (self.ctxt.init_data.maybe_live_dead(path), false),

0 commit comments

Comments
 (0)