Skip to content

Commit 638980a

Browse files
committed
Using tracing macros in placeholder_error.rs
1 parent 1eb79f3 commit 638980a

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ impl NiceRegionError<'me, 'tcx> {
190190
// = note: Due to a where-clause on the function `all`,
191191
// = note: `T` must implement `...` for any two lifetimes `'1` and `'2`.
192192
// = note: However, the type `T` only implements `...` for some specific lifetime `'2`.
193+
#[instrument(level = "debug", skip(self))]
193194
fn try_report_placeholders_trait(
194195
&self,
195196
vid: Option<ty::Region<'tcx>>,
@@ -200,17 +201,6 @@ impl NiceRegionError<'me, 'tcx> {
200201
expected_substs: SubstsRef<'tcx>,
201202
actual_substs: SubstsRef<'tcx>,
202203
) -> DiagnosticBuilder<'tcx> {
203-
debug!(
204-
"try_report_placeholders_trait(\
205-
vid={:?}, \
206-
sub_placeholder={:?}, \
207-
sup_placeholder={:?}, \
208-
trait_def_id={:?}, \
209-
expected_substs={:?}, \
210-
actual_substs={:?})",
211-
vid, sub_placeholder, sup_placeholder, trait_def_id, expected_substs, actual_substs
212-
);
213-
214204
let span = cause.span(self.tcx());
215205
let msg = format!(
216206
"implementation of `{}` is not general enough",
@@ -285,17 +275,13 @@ impl NiceRegionError<'me, 'tcx> {
285275

286276
let any_self_ty_has_vid = actual_self_ty_has_vid || expected_self_ty_has_vid;
287277

288-
debug!("try_report_placeholders_trait: actual_has_vid={:?}", actual_has_vid);
289-
debug!("try_report_placeholders_trait: expected_has_vid={:?}", expected_has_vid);
290-
debug!("try_report_placeholders_trait: has_sub={:?}", has_sub);
291-
debug!("try_report_placeholders_trait: has_sup={:?}", has_sup);
292-
debug!(
293-
"try_report_placeholders_trait: actual_self_ty_has_vid={:?}",
294-
actual_self_ty_has_vid
295-
);
296278
debug!(
297-
"try_report_placeholders_trait: expected_self_ty_has_vid={:?}",
298-
expected_self_ty_has_vid
279+
?actual_has_vid,
280+
?expected_has_vid,
281+
?has_sub,
282+
?has_sup,
283+
?actual_self_ty_has_vid,
284+
?expected_self_ty_has_vid,
299285
);
300286

301287
self.explain_actual_impl_that_was_found(

0 commit comments

Comments
 (0)