diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2014-10-28 14:48:52 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2014-11-03 17:41:00 -0500 |
| commit | 319d778ed306d0b3c35af79c47c702dbdebf6d09 (patch) | |
| tree | b1861eb5f0ab01a403c3fc93deea9244a72aded2 /src/libsyntax/parse | |
| parent | 01b81c0ebb45d36198fa8a78dcdcb8144e4bb06c (diff) | |
| download | rust-319d778ed306d0b3c35af79c47c702dbdebf6d09.tar.gz rust-319d778ed306d0b3c35af79c47c702dbdebf6d09.zip | |
Restructure AST so that the associated type definition carries
bounds like any other "type parameter".
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index aa3b9668d46..ad445ef331f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1229,16 +1229,13 @@ impl<'a> Parser<'a> { /// Parses `type Foo;` in a trait declaration only. The `type` keyword has /// already been parsed. fn parse_associated_type(&mut self, attrs: Vec<Attribute>) - -> AssociatedType { - let lo = self.span.lo; - let ident = self.parse_ident(); - let hi = self.span.hi; + -> AssociatedType + { + let ty_param = self.parse_ty_param(); self.expect(&token::Semi); AssociatedType { - id: ast::DUMMY_NODE_ID, - span: mk_sp(lo, hi), - ident: ident, attrs: attrs, + ty_param: ty_param, } } |
