aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/display.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/display.rs')
-rw-r--r--crates/hir_ty/src/display.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs
index e6473586b..21291ddda 100644
--- a/crates/hir_ty/src/display.rs
+++ b/crates/hir_ty/src/display.rs
@@ -245,19 +245,19 @@ impl HirDisplay for ProjectionTy {
245 } 245 }
246 246
247 let trait_ = f.db.trait_data(self.trait_(f.db)); 247 let trait_ = f.db.trait_data(self.trait_(f.db));
248 let first_parameter = self.parameters[0].into_displayable( 248 let first_parameter = self.substitution[0].into_displayable(
249 f.db, 249 f.db,
250 f.max_size, 250 f.max_size,
251 f.omit_verbose_types, 251 f.omit_verbose_types,
252 f.display_target, 252 f.display_target,
253 ); 253 );
254 write!(f, "<{} as {}", first_parameter, trait_.name)?; 254 write!(f, "<{} as {}", first_parameter, trait_.name)?;
255 if self.parameters.len() > 1 { 255 if self.substitution.len() > 1 {
256 write!(f, "<")?; 256 write!(f, "<")?;
257 f.write_joined(&self.parameters[1..], ", ")?; 257 f.write_joined(&self.substitution[1..], ", ")?;
258 write!(f, ">")?; 258 write!(f, ">")?;
259 } 259 }
260 write!(f, ">::{}", f.db.type_alias_data(from_assoc_type_id(self.associated_ty)).name)?; 260 write!(f, ">::{}", f.db.type_alias_data(from_assoc_type_id(self.associated_ty_id)).name)?;
261 Ok(()) 261 Ok(())
262 } 262 }
263} 263}
@@ -491,8 +491,8 @@ impl HirDisplay for Ty {
491 } 491 }
492 } else { 492 } else {
493 let projection_ty = ProjectionTy { 493 let projection_ty = ProjectionTy {
494 associated_ty: to_assoc_type_id(type_alias), 494 associated_ty_id: to_assoc_type_id(type_alias),
495 parameters: parameters.clone(), 495 substitution: parameters.clone(),
496 }; 496 };
497 497
498 projection_ty.hir_fmt(f)?; 498 projection_ty.hir_fmt(f)?;
@@ -709,7 +709,7 @@ fn write_bounds_like_dyn_trait(
709 angle_open = true; 709 angle_open = true;
710 } 710 }
711 let type_alias = f.db.type_alias_data(from_assoc_type_id( 711 let type_alias = f.db.type_alias_data(from_assoc_type_id(
712 projection_pred.projection_ty.associated_ty, 712 projection_pred.projection_ty.associated_ty_id,
713 )); 713 ));
714 write!(f, "{} = ", type_alias.name)?; 714 write!(f, "{} = ", type_alias.name)?;
715 projection_pred.ty.hir_fmt(f)?; 715 projection_pred.ty.hir_fmt(f)?;
@@ -782,7 +782,7 @@ impl HirDisplay for GenericPredicate {
782 f, 782 f,
783 ">::{} = ", 783 ">::{} = ",
784 f.db.type_alias_data(from_assoc_type_id( 784 f.db.type_alias_data(from_assoc_type_id(
785 projection_pred.projection_ty.associated_ty 785 projection_pred.projection_ty.associated_ty_id
786 )) 786 ))
787 .name, 787 .name,
788 )?; 788 )?;