@@ -168,14 +168,22 @@ impl<'a> Rewrite for SegmentParam<'a> {
168
168
SegmentParam :: LifeTime ( lt) => lt. rewrite ( context, shape) ,
169
169
SegmentParam :: Type ( ty) => ty. rewrite ( context, shape) ,
170
170
SegmentParam :: Binding ( assoc_ty_constraint) => {
171
- let mut result = match context . config . type_punctuation_density ( ) {
172
- TypeDensity :: Wide => {
173
- format ! ( "{} = " , rewrite_ident( context, assoc_ty_constraint. ident) )
171
+ let mut result = match assoc_ty_constraint . kind {
172
+ ast :: AssocTyConstraintKind :: Bound { .. } => {
173
+ format ! ( "{}: " , rewrite_ident( context, assoc_ty_constraint. ident) )
174
174
}
175
- TypeDensity :: Compressed => {
176
- format ! ( "{}=" , rewrite_ident( context, assoc_ty_constraint. ident) )
175
+ ast:: AssocTyConstraintKind :: Equality { .. } => {
176
+ match context. config . type_punctuation_density ( ) {
177
+ TypeDensity :: Wide => {
178
+ format ! ( "{} = " , rewrite_ident( context, assoc_ty_constraint. ident) )
179
+ }
180
+ TypeDensity :: Compressed => {
181
+ format ! ( "{}=" , rewrite_ident( context, assoc_ty_constraint. ident) )
182
+ }
183
+ }
177
184
}
178
185
} ;
186
+
179
187
let budget = shape. width . checked_sub ( result. len ( ) ) ?;
180
188
let rewrite = assoc_ty_constraint
181
189
. kind
0 commit comments