1
Fork 0

Store all generic bounds as where predicates.

This commit is contained in:
Camille GILLOT 2022-02-07 22:58:30 +01:00
parent 05b29f9a92
commit 94449e6101
30 changed files with 770 additions and 953 deletions

View file

@ -2096,21 +2096,8 @@ impl<'a> State<'a> {
self.print_ident(param.name.ident());
match param.kind {
GenericParamKind::Lifetime { .. } => {
let mut sep = ":";
for bound in param.bounds {
match bound {
GenericBound::Outlives(ref lt) => {
self.word(sep);
self.print_lifetime(lt);
sep = "+";
}
_ => panic!(),
}
}
}
GenericParamKind::Lifetime { .. } => {}
GenericParamKind::Type { ref default, .. } => {
self.print_bounds(":", param.bounds);
if let Some(default) = default {
self.space();
self.word_space("=");