Add a span to ast::TyParam

This commit is contained in:
Nick Cameron
2014-04-03 13:53:57 +13:00
parent 09bfb92fdc
commit c3b2f2b0c6
6 changed files with 13 additions and 6 deletions

View File

@@ -3393,6 +3393,7 @@ impl<'a> Parser<'a> {
// matches typaram = IDENT optbounds ( EQ ty )?
fn parse_ty_param(&mut self) -> TyParam {
let ident = self.parse_ident();
let span = self.span;
let (_, opt_bounds) = self.parse_optional_ty_param_bounds(false);
// For typarams we don't care about the difference b/w "<T>" and "<T:>".
let bounds = opt_bounds.unwrap_or_default();
@@ -3407,7 +3408,8 @@ impl<'a> Parser<'a> {
ident: ident,
id: ast::DUMMY_NODE_ID,
bounds: bounds,
default: default
default: default,
span: span,
}
}