mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 06:03:16 +00:00
Change declaration type parameter syntax to foo<T>.
This commit is contained in:
parent
0107d6a81d
commit
9304b7ee59
@ -1755,6 +1755,9 @@ fn parse_ty_params(p: &parser) -> [ast::ty_param] {
|
||||
ty_params =
|
||||
parse_seq(token::LBRACKET, token::RBRACKET, some(token::COMMA),
|
||||
parse_ty_param, p).node;
|
||||
} else if p.peek() == token::LT {
|
||||
p.bump();
|
||||
ty_params = parse_seq_to_gt(some(token::COMMA), parse_ty_param, p);
|
||||
}
|
||||
if p.peek() == token::LT {
|
||||
ty_params =
|
||||
|
@ -1210,13 +1210,13 @@ fn print_kind(s: &ps, kind: ast::kind) {
|
||||
|
||||
fn print_type_params(s: &ps, params: &[ast::ty_param]) {
|
||||
if vec::len(params) > 0u {
|
||||
word(s.s, "[");
|
||||
word(s.s, "<");
|
||||
fn printParam(s: &ps, param: &ast::ty_param) {
|
||||
print_kind(s, param.kind);
|
||||
word(s.s, param.ident);
|
||||
}
|
||||
commasep(s, inconsistent, params, printParam);
|
||||
word(s.s, "]");
|
||||
word(s.s, ">");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user