Skip to content

Commit 31a4239

Browse files
committed
debug
1 parent c57a721 commit 31a4239

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

compiler/rustc_hir_typeck/src/method/suggest.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3330,11 +3330,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
33303330
let prefix = if visible { "use " } else { "" };
33313331
let postfix = if visible { ";" } else { "" };
33323332
let path_strings = candidates.iter().map(|trait_did| {
3333-
debug!(
3334-
"trait_did={:?} with_crate_prefix={:?}",
3335-
trait_did,
3336-
with_crate_prefix!(self.tcx.def_path_str(*trait_did))
3337-
);
3333+
// debug!(
3334+
// "trait_did={:?} with_crate_prefix={:?}",
3335+
// trait_did,
3336+
// with_crate_prefix!(self.tcx.def_path_str(*trait_did))
3337+
// );
33383338
format!(
33393339
"{prefix}{}{postfix}\n",
33403340
with_crate_prefix!(self.tcx.def_path_str(*trait_did)),

compiler/rustc_middle/src/ty/print/pretty.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
372372
fn try_print_visible_def_path(&mut self, def_id: DefId) -> Result<bool, PrintError> {
373373
debug!("try_print_visible_def_path: def_id={:?}", def_id);
374374
if with_no_visible_paths() {
375+
debug!("with no visible path: def_id={:?}", def_id);
375376
return Ok(false);
376377
}
377378

@@ -2227,6 +2228,7 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> {
22272228
def_id: DefId,
22282229
args: &'tcx [GenericArg<'tcx>],
22292230
) -> Result<(), PrintError> {
2231+
debug!("print_def_path: def_id={:?}, args={:?}", def_id, args);
22302232
if args.is_empty() {
22312233
match self.try_print_trimmed_def_path(def_id)? {
22322234
true => return Ok(()),
@@ -2240,6 +2242,7 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> {
22402242
}
22412243

22422244
let key = self.tcx.def_key(def_id);
2245+
debug!("print_def_path: def_id={:?}, key={:?}", def_id, key);
22432246
if let DefPathData::Impl = key.disambiguated_data.data {
22442247
// Always use types for non-local impls, where types are always
22452248
// available, and filename/line-number is mostly uninteresting.

0 commit comments

Comments
 (0)