Store all generic bounds as where predicates.
This commit is contained in:
parent
05b29f9a92
commit
94449e6101
30 changed files with 770 additions and 953 deletions
|
@ -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("=");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue