]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
Move ty::print methods to Drop-based scope guards
[rust.git] / compiler / rustc_trait_selection / src / traits / select / candidate_assembly.rs
index 0c5d764e79d0cb25a472294b607a3dbb71ce5e48..d92f26288c14e8e94dcdd7af4c12f7f714e16713 100644 (file)
@@ -92,7 +92,7 @@ fn candidate_from_obligation_no_cache<'o>(
                     if !candidate_set.ambiguous && no_candidates_apply {
                         let trait_ref = stack.obligation.predicate.skip_binder().trait_ref;
                         let self_ty = trait_ref.self_ty();
-                        let (trait_desc, self_desc) = with_no_trimmed_paths(|| {
+                        let (trait_desc, self_desc) = with_no_trimmed_paths!({
                             let trait_desc = trait_ref.print_only_trait_path().to_string();
                             let self_desc = if self_ty.has_concrete_skeleton() {
                                 Some(self_ty.to_string())
@@ -254,7 +254,6 @@ pub(super) fn assemble_candidates<'o>(
         };
 
         if obligation.predicate.skip_binder().self_ty().is_ty_var() {
-            debug!(ty = ?obligation.predicate.skip_binder().self_ty(), "ambiguous inference var or opaque type");
             // Self is a type variable (e.g., `_: AsRef<str>`).
             //
             // This is somewhat problematic, as the current scheme can't really