convert ast::{ty_field_,ty_method} into a struct
This commit is contained in:
parent
8cdc3fda11
commit
5ba7e55a4c
5 changed files with 47 additions and 21 deletions
|
@ -421,10 +421,16 @@ impl Parser {
|
|||
debug!("parse_trait_methods(): parsing required method");
|
||||
// NB: at the moment, visibility annotations on required
|
||||
// methods are ignored; this could change.
|
||||
required({ident: ident, attrs: attrs,
|
||||
purity: pur, decl: d, tps: tps,
|
||||
self_ty: self_ty,
|
||||
id: p.get_id(), span: mk_sp(lo, hi)})
|
||||
required(ty_method {
|
||||
ident: ident,
|
||||
attrs: attrs,
|
||||
purity: pur,
|
||||
decl: d,
|
||||
tps: tps,
|
||||
self_ty: self_ty,
|
||||
id: p.get_id(),
|
||||
span: mk_sp(lo, hi)
|
||||
})
|
||||
}
|
||||
token::LBRACE => {
|
||||
debug!("parse_trait_methods(): parsing provided method");
|
||||
|
@ -467,9 +473,9 @@ impl Parser {
|
|||
spanned(
|
||||
lo,
|
||||
ty.span.hi,
|
||||
{
|
||||
ast::ty_field_ {
|
||||
ident: id,
|
||||
mt: ast::mt { ty: ty, mutbl: mutbl }
|
||||
mt: ast::mt { ty: ty, mutbl: mutbl },
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue