mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Rename some fields to their Chalk names
This commit is contained in:
parent
f57e2f5598
commit
3411fe3e84
11 changed files with 47 additions and 47 deletions
|
@ -245,19 +245,19 @@ impl HirDisplay for ProjectionTy {
|
|||
}
|
||||
|
||||
let trait_ = f.db.trait_data(self.trait_(f.db));
|
||||
let first_parameter = self.parameters[0].into_displayable(
|
||||
let first_parameter = self.substitution[0].into_displayable(
|
||||
f.db,
|
||||
f.max_size,
|
||||
f.omit_verbose_types,
|
||||
f.display_target,
|
||||
);
|
||||
write!(f, "<{} as {}", first_parameter, trait_.name)?;
|
||||
if self.parameters.len() > 1 {
|
||||
if self.substitution.len() > 1 {
|
||||
write!(f, "<")?;
|
||||
f.write_joined(&self.parameters[1..], ", ")?;
|
||||
f.write_joined(&self.substitution[1..], ", ")?;
|
||||
write!(f, ">")?;
|
||||
}
|
||||
write!(f, ">::{}", f.db.type_alias_data(from_assoc_type_id(self.associated_ty)).name)?;
|
||||
write!(f, ">::{}", f.db.type_alias_data(from_assoc_type_id(self.associated_ty_id)).name)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
@ -491,8 +491,8 @@ impl HirDisplay for Ty {
|
|||
}
|
||||
} else {
|
||||
let projection_ty = ProjectionTy {
|
||||
associated_ty: to_assoc_type_id(type_alias),
|
||||
parameters: parameters.clone(),
|
||||
associated_ty_id: to_assoc_type_id(type_alias),
|
||||
substitution: parameters.clone(),
|
||||
};
|
||||
|
||||
projection_ty.hir_fmt(f)?;
|
||||
|
@ -709,7 +709,7 @@ fn write_bounds_like_dyn_trait(
|
|||
angle_open = true;
|
||||
}
|
||||
let type_alias = f.db.type_alias_data(from_assoc_type_id(
|
||||
projection_pred.projection_ty.associated_ty,
|
||||
projection_pred.projection_ty.associated_ty_id,
|
||||
));
|
||||
write!(f, "{} = ", type_alias.name)?;
|
||||
projection_pred.ty.hir_fmt(f)?;
|
||||
|
@ -782,7 +782,7 @@ impl HirDisplay for GenericPredicate {
|
|||
f,
|
||||
">::{} = ",
|
||||
f.db.type_alias_data(from_assoc_type_id(
|
||||
projection_pred.projection_ty.associated_ty
|
||||
projection_pred.projection_ty.associated_ty_id
|
||||
))
|
||||
.name,
|
||||
)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue