Add generic arg infer
This commit is contained in:
parent
71a6c7c803
commit
417b098cfc
28 changed files with 265 additions and 89 deletions
|
@ -103,6 +103,7 @@ impl<'a> State<'a> {
|
|||
Node::TraitRef(a) => self.print_trait_ref(&a),
|
||||
Node::Binding(a) | Node::Pat(a) => self.print_pat(&a),
|
||||
Node::Arm(a) => self.print_arm(&a),
|
||||
Node::Infer(_) => self.print_string("_", ast::StrStyle::Cooked),
|
||||
Node::Block(a) => {
|
||||
// Containing cbox, will be closed by print-block at `}`.
|
||||
self.cbox(INDENT_UNIT);
|
||||
|
@ -437,14 +438,14 @@ impl<'a> State<'a> {
|
|||
self.print_anon_const(e);
|
||||
self.s.word(")");
|
||||
}
|
||||
hir::TyKind::Infer => {
|
||||
self.s.word("_");
|
||||
}
|
||||
hir::TyKind::Err => {
|
||||
self.popen();
|
||||
self.s.word("/*ERROR*/");
|
||||
self.pclose();
|
||||
}
|
||||
hir::TyKind::Infer => {
|
||||
self.s.word("_");
|
||||
}
|
||||
}
|
||||
self.end()
|
||||
}
|
||||
|
@ -1851,6 +1852,7 @@ impl<'a> State<'a> {
|
|||
GenericArg::Lifetime(_) => {}
|
||||
GenericArg::Type(ty) => s.print_type(ty),
|
||||
GenericArg::Const(ct) => s.print_anon_const(&ct.value),
|
||||
GenericArg::Infer(_inf) => s.word("_"),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue