diff options
author | Florian Diebold <[email protected]> | 2021-04-05 16:13:50 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-05 18:19:18 +0100 |
commit | 69714d36e6617800f3edea174f5d6f76c985ad4c (patch) | |
tree | e74b3e3ab442e4e2e36c3985de978ebbbccf7634 /crates/hir_ty/src/display.rs | |
parent | 6e9798a992b30b735f14018379e0861d2ec30647 (diff) |
Hide Binders internals more
Diffstat (limited to 'crates/hir_ty/src/display.rs')
-rw-r--r-- | crates/hir_ty/src/display.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs index 1108e5a10..2e178e5a8 100644 --- a/crates/hir_ty/src/display.rs +++ b/crates/hir_ty/src/display.rs | |||
@@ -353,7 +353,7 @@ impl HirDisplay for Ty { | |||
353 | .as_ref() | 353 | .as_ref() |
354 | .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); | 354 | .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); |
355 | let bounds = data.subst(parameters); | 355 | let bounds = data.subst(parameters); |
356 | bounds.value | 356 | bounds.into_value_and_skipped_binders().0 |
357 | } else { | 357 | } else { |
358 | Vec::new() | 358 | Vec::new() |
359 | } | 359 | } |
@@ -543,7 +543,7 @@ impl HirDisplay for Ty { | |||
543 | .as_ref() | 543 | .as_ref() |
544 | .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); | 544 | .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); |
545 | let bounds = data.subst(¶meters); | 545 | let bounds = data.subst(¶meters); |
546 | write_bounds_like_dyn_trait_with_prefix("impl", &bounds.value, f)?; | 546 | write_bounds_like_dyn_trait_with_prefix("impl", bounds.skip_binders(), f)?; |
547 | // FIXME: it would maybe be good to distinguish this from the alias type (when debug printing), and to show the substitution | 547 | // FIXME: it would maybe be good to distinguish this from the alias type (when debug printing), and to show the substitution |
548 | } | 548 | } |
549 | ImplTraitId::AsyncBlockTypeImplTrait(..) => { | 549 | ImplTraitId::AsyncBlockTypeImplTrait(..) => { |
@@ -630,7 +630,7 @@ impl HirDisplay for Ty { | |||
630 | .as_ref() | 630 | .as_ref() |
631 | .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); | 631 | .map(|rpit| rpit.impl_traits[idx as usize].bounds.clone()); |
632 | let bounds = data.subst(&opaque_ty.substitution); | 632 | let bounds = data.subst(&opaque_ty.substitution); |
633 | write_bounds_like_dyn_trait_with_prefix("impl", &bounds.value, f)?; | 633 | write_bounds_like_dyn_trait_with_prefix("impl", bounds.skip_binders(), f)?; |
634 | } | 634 | } |
635 | ImplTraitId::AsyncBlockTypeImplTrait(..) => { | 635 | ImplTraitId::AsyncBlockTypeImplTrait(..) => { |
636 | write!(f, "{{async block}}")?; | 636 | write!(f, "{{async block}}")?; |