Give new signature the desirable name
diff --git a/src/attr.rs b/src/attr.rs
index e865c1e..73af023 100644
--- a/src/attr.rs
+++ b/src/attr.rs
@@ -406,23 +406,23 @@
}
impl Attribute {
- pub fn parse_outer2(input: ParseStream) -> Result<Vec<Self>> {
+ pub fn parse_outer(input: ParseStream) -> Result<Vec<Self>> {
let mut attrs = Vec::new();
while input.peek(Token![#]) {
- attrs.push(input.parse_synom(Attribute::parse_outer)?);
+ attrs.push(input.parse_synom(Attribute::old_parse_outer)?);
}
Ok(attrs)
}
- pub fn parse_inner2(input: ParseStream) -> Result<Vec<Self>> {
+ pub fn parse_inner(input: ParseStream) -> Result<Vec<Self>> {
let mut attrs = Vec::new();
while input.peek(Token![#]) {
- attrs.push(input.parse_synom(Attribute::parse_inner)?);
+ attrs.push(input.parse_synom(Attribute::old_parse_inner)?);
}
Ok(attrs)
}
- named!(pub parse_inner -> Self, alt!(
+ named!(pub old_parse_inner -> Self, alt!(
do_parse!(
pound: punct!(#) >>
bang: punct!(!) >>
@@ -461,7 +461,7 @@
)
));
- named!(pub parse_outer -> Self, alt!(
+ named!(pub old_parse_outer -> Self, alt!(
do_parse!(
pound: punct!(#) >>
path_and_tts: brackets!(tuple!(
diff --git a/src/data.rs b/src/data.rs
index 41af7a8..9c77254 100644
--- a/src/data.rs
+++ b/src/data.rs
@@ -192,7 +192,7 @@
impl Parse for Variant {
fn parse(input: ParseStream) -> Result<Self> {
Ok(Variant {
- attrs: input.call(Attribute::parse_outer2)?,
+ attrs: input.call(Attribute::parse_outer)?,
ident: input.parse()?,
fields: {
if input.peek(token::Brace) {
@@ -244,7 +244,7 @@
impl Field {
named!(pub parse_named -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
id: syn!(Ident) >>
colon: punct!(:) >>
@@ -259,7 +259,7 @@
));
named!(pub parse_unnamed -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
ty: syn!(Type) >>
(Field {
diff --git a/src/derive.rs b/src/derive.rs
index ecef776..b7bfa12 100644
--- a/src/derive.rs
+++ b/src/derive.rs
@@ -99,7 +99,7 @@
impl Synom for DeriveInput {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
which: syn!(DeriveInputKind) >>
id: syn!(Ident) >>
diff --git a/src/expr.rs b/src/expr.rs
index 60caae2..540c994 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1404,7 +1404,7 @@
#[cfg(feature = "full")]
named!(unary_expr(allow_struct: bool, allow_block: bool) -> Expr, alt!(
do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
op: syn!(UnOp) >>
expr: call!(unary_expr, allow_struct, true) >>
(ExprUnary {
@@ -1415,7 +1415,7 @@
)
|
do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
and: punct!(&) >>
mutability: option!(keyword!(mut)) >>
expr: call!(unary_expr, allow_struct, true) >>
@@ -1428,7 +1428,7 @@
)
|
do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
box_: keyword!(box) >>
expr: call!(unary_expr, allow_struct, true) >>
(ExprBox {
@@ -1689,7 +1689,7 @@
#[cfg(feature = "full")]
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
lit: syn!(Lit) >>
(ExprLit {
attrs: attrs,
@@ -1705,7 +1705,7 @@
#[cfg(feature = "full")]
impl Synom for ExprMacro {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
mac: syn!(Macro) >>
(ExprMacro {
attrs: attrs,
@@ -1747,9 +1747,9 @@
#[cfg(feature = "full")]
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
e: parens!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
syn!(Expr),
)) >>
(ExprParen {
@@ -1771,9 +1771,9 @@
#[cfg(feature = "full")]
impl Synom for ExprArray {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
elems: brackets!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Punctuated::parse_terminated),
)) >>
(ExprArray {
@@ -1842,9 +1842,9 @@
#[cfg(feature = "full")]
impl Synom for ExprTuple {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
elems: parens!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Punctuated::parse_terminated),
)) >>
(ExprTuple {
@@ -1943,14 +1943,14 @@
#[cfg(feature = "full")]
impl Synom for ExprForLoop {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
label: option!(syn!(Label)) >>
for_: keyword!(for) >>
pat: syn!(Pat) >>
in_: keyword!(in) >>
expr: expr_no_struct >>
block: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
)) >>
(ExprForLoop {
@@ -1979,11 +1979,11 @@
#[cfg(feature = "full")]
impl Synom for ExprLoop {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
label: option!(syn!(Label)) >>
loop_: keyword!(loop) >>
block: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
)) >>
(ExprLoop {
@@ -2009,11 +2009,11 @@
#[cfg(feature = "full")]
impl Synom for ExprMatch {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
match_: keyword!(match) >>
obj: expr_no_struct >>
braced_content: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
many0!(syn!(Arm)),
)) >>
(ExprMatch {
@@ -2071,7 +2071,7 @@
#[cfg(feature = "full")]
impl Synom for Arm {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
leading_vert: option!(punct!(|)) >>
pats: call!(Punctuated::parse_separated_nonempty) >>
guard: option!(tuple!(keyword!(if), syn!(Expr))) >>
@@ -2107,7 +2107,7 @@
#[cfg(feature = "full")]
named!(expr_closure(allow_struct: bool) -> Expr, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
asyncness: option!(keyword!(async)) >>
movability: option!(cond_reduce!(asyncness.is_none(), keyword!(static))) >>
capture: option!(keyword!(move)) >>
@@ -2147,7 +2147,7 @@
#[cfg(feature = "full")]
impl Synom for ExprAsync {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
async_token: keyword!(async) >>
capture: option!(keyword!(move)) >>
block: syn!(Block) >>
@@ -2180,12 +2180,12 @@
#[cfg(feature = "full")]
impl Synom for ExprWhile {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
label: option!(syn!(Label)) >>
while_: keyword!(while) >>
cond: expr_no_struct >>
block: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
)) >>
(ExprWhile {
@@ -2212,7 +2212,7 @@
#[cfg(feature = "full")]
impl Synom for ExprWhileLet {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
label: option!(syn!(Label)) >>
while_: keyword!(while) >>
let_: keyword!(let) >>
@@ -2220,7 +2220,7 @@
eq: punct!(=) >>
value: expr_no_struct >>
block: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
)) >>
(ExprWhileLet {
@@ -2266,7 +2266,7 @@
#[cfg(feature = "full")]
impl Synom for ExprContinue {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
cont: keyword!(continue) >>
label: option!(syn!(Lifetime)) >>
(ExprContinue {
@@ -2283,7 +2283,7 @@
#[cfg(feature = "full")]
named!(expr_break(allow_struct: bool) -> Expr, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
break_: keyword!(break) >>
label: option!(syn!(Lifetime)) >>
// We can't allow blocks after a `break` expression when we wouldn't
@@ -2299,7 +2299,7 @@
#[cfg(feature = "full")]
named!(expr_ret(allow_struct: bool) -> Expr, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
return_: keyword!(return) >>
// NOTE: return is greedy and eats blocks after it even when in a
// position where structs are not allowed, such as in if statement
@@ -2317,10 +2317,10 @@
#[cfg(feature = "full")]
impl Synom for ExprStruct {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
path: syn!(Path) >>
data: braces!(do_parse!(
- inner_attrs: many0!(Attribute::parse_inner) >>
+ inner_attrs: many0!(Attribute::old_parse_inner) >>
fields: call!(Punctuated::parse_terminated) >>
base: option!(cond!(fields.empty_or_trailing(), do_parse!(
dots: punct!(..) >>
@@ -2358,7 +2358,7 @@
#[cfg(feature = "full")]
impl Synom for FieldValue {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
field_value: alt!(
tuple!(syn!(Member), map!(punct!(:), Some), syn!(Expr))
|
@@ -2388,9 +2388,9 @@
#[cfg(feature = "full")]
impl Synom for ExprRepeat {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
data: brackets!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
syn!(Expr),
punct!(;),
syn!(Expr),
@@ -2433,10 +2433,10 @@
#[cfg(feature = "full")]
impl Synom for ExprBlock {
named!(parse -> Self, do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
label: option!(syn!(Label)) >>
block: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
)) >>
(ExprBlock {
@@ -2500,7 +2500,7 @@
#[cfg(feature = "full")]
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
pair: qpath >>
(ExprPath {
attrs: attrs,
@@ -2612,7 +2612,7 @@
(stmt)
)) >>
last: option!(do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
mut e: syn!(Expr) >>
({
e.replace_attrs(attrs);
@@ -2650,7 +2650,7 @@
#[cfg(feature = "full")]
named!(stmt_mac -> Stmt, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
what: call!(Path::parse_mod_style) >>
bang: punct!(!) >>
// Only parse braces here; paren and bracket will get parsed as
@@ -2672,7 +2672,7 @@
#[cfg(feature = "full")]
named!(stmt_local -> Stmt, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
let_: keyword!(let) >>
pats: call!(Punctuated::parse_separated_nonempty) >>
ty: option!(tuple!(punct!(:), syn!(Type))) >>
@@ -2693,7 +2693,7 @@
#[cfg(feature = "full")]
named!(stmt_blockexpr -> Stmt, do_parse!(
- mut attrs: many0!(Attribute::parse_outer) >>
+ mut attrs: many0!(Attribute::old_parse_outer) >>
mut e: expr_nosemi >>
semi: option!(punct!(;)) >>
({
@@ -2709,7 +2709,7 @@
#[cfg(feature = "full")]
named!(stmt_expr -> Stmt, do_parse!(
- mut attrs: many0!(Attribute::parse_outer) >>
+ mut attrs: many0!(Attribute::old_parse_outer) >>
mut e: syn!(Expr) >>
semi: punct!(;) >>
({
diff --git a/src/file.rs b/src/file.rs
index 9b5b11f..a3ce02b 100644
--- a/src/file.rs
+++ b/src/file.rs
@@ -92,7 +92,7 @@
impl Synom for File {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_inner) >>
+ attrs: many0!(Attribute::old_parse_inner) >>
items: many0!(Item::parse) >>
(File {
shebang: None,
diff --git a/src/generics.rs b/src/generics.rs
index fb8d672..a9b21a2 100644
--- a/src/generics.rs
+++ b/src/generics.rs
@@ -543,7 +543,7 @@
impl Synom for LifetimeDef {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
life: syn!(Lifetime) >>
colon: option!(punct!(:)) >>
bounds: cond!(
@@ -584,7 +584,7 @@
impl Synom for TypeParam {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
id: syn!(Ident) >>
colon: option!(punct!(:)) >>
bounds: cond!(
@@ -670,7 +670,7 @@
impl Synom for ConstParam {
named!(parse -> Self, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
const_: keyword!(const) >>
ident: syn!(Ident) >>
colon: punct!(:) >>
diff --git a/src/item.rs b/src/item.rs
index cb6184d..569c1c8 100644
--- a/src/item.rs
+++ b/src/item.rs
@@ -805,7 +805,7 @@
));
impl_synom!(ItemMacro "macro item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
what: call!(Path::parse_mod_style) >>
bang: punct!(!) >>
ident: option!(syn!(Ident)) >>
@@ -826,7 +826,7 @@
// TODO: figure out the actual grammar; is body required to be braced?
impl_synom!(ItemMacro2 "macro2 item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
macro_: keyword!(macro) >>
ident: syn!(Ident) >>
@@ -845,7 +845,7 @@
));
impl_synom!(ItemExternCrate "extern crate item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
extern_: keyword!(extern) >>
crate_: keyword!(crate) >>
@@ -864,7 +864,7 @@
));
impl_synom!(ItemUse "use item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
use_: keyword!(use) >>
leading_colon: option!(punct!(::)) >>
@@ -949,7 +949,7 @@
));
impl_synom!(ItemStatic "static item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
static_: keyword!(static) >>
mutability: option!(keyword!(mut)) >>
@@ -974,7 +974,7 @@
));
impl_synom!(ItemConst "const item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
const_: keyword!(const) >>
ident: syn!(Ident) >>
@@ -997,7 +997,7 @@
));
impl_synom!(ItemFn "fn item" do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
constness: option!(keyword!(const)) >>
unsafety: option!(keyword!(unsafe)) >>
@@ -1010,7 +1010,7 @@
ret: syn!(ReturnType) >>
where_clause: option!(syn!(WhereClause)) >>
inner_attrs_stmts: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
)) >>
(ItemFn {
@@ -1089,7 +1089,7 @@
}
impl_synom!(ItemMod "mod item" do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
mod_: keyword!(mod) >>
ident: syn!(Ident) >>
@@ -1102,7 +1102,7 @@
|
braces!(
tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
many0!(Item::parse),
)
) => {|(brace, (inner_attrs, items))| (
@@ -1126,10 +1126,10 @@
));
impl_synom!(ItemForeignMod "foreign mod item" do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
abi: syn!(Abi) >>
braced_content: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
many0!(ForeignItem::parse),
)) >>
(ItemForeignMod {
@@ -1155,7 +1155,7 @@
));
impl_synom!(ForeignItemFn "foreign function" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
fn_: keyword!(fn) >>
ident: syn!(Ident) >>
@@ -1191,7 +1191,7 @@
));
impl_synom!(ForeignItemStatic "foreign static" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
static_: keyword!(static) >>
mutability: option!(keyword!(mut)) >>
@@ -1212,7 +1212,7 @@
));
impl_synom!(ForeignItemType "foreign type" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
type_: keyword!(type) >>
ident: syn!(Ident) >>
@@ -1227,7 +1227,7 @@
));
impl_synom!(ForeignItemMacro "macro in extern block" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
mac: syn!(Macro) >>
semi: cond!(!is_brace(&mac.delimiter), punct!(;)) >>
(ForeignItemMacro {
@@ -1238,7 +1238,7 @@
));
impl_synom!(ItemType "type item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
type_: keyword!(type) >>
ident: syn!(Ident) >>
@@ -1263,7 +1263,7 @@
));
named!(existential_type(vis: bool) -> ItemExistential, do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: cond_reduce!(vis, syn!(Visibility)) >>
existential_token: keyword!(existential) >>
type_token: keyword!(type) >>
@@ -1309,7 +1309,7 @@
));
impl_synom!(ItemUnion "union item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
union_: keyword!(union) >>
ident: syn!(Ident) >>
@@ -1330,7 +1330,7 @@
));
impl_synom!(ItemTrait "trait item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
unsafety: option!(keyword!(unsafe)) >>
auto_: option!(keyword!(auto)) >>
@@ -1372,7 +1372,7 @@
));
impl_synom!(TraitItemConst "const trait item" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
const_: keyword!(const) >>
ident: syn!(Ident) >>
colon: punct!(:) >>
@@ -1391,7 +1391,7 @@
));
impl_synom!(TraitItemMethod "method trait item" do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
constness: option!(keyword!(const)) >>
unsafety: option!(keyword!(unsafe)) >>
abi: option!(syn!(Abi)) >>
@@ -1402,7 +1402,7 @@
ret: syn!(ReturnType) >>
where_clause: option!(syn!(WhereClause)) >>
body: option!(braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
))) >>
semi: cond!(body.is_none(), punct!(;)) >>
@@ -1447,7 +1447,7 @@
));
impl_synom!(TraitItemType "trait item type" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
type_: keyword!(type) >>
ident: syn!(Ident) >>
generics: syn!(Generics) >>
@@ -1486,7 +1486,7 @@
));
impl_synom!(TraitItemMacro "trait item macro" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
mac: syn!(Macro) >>
semi: cond!(!is_brace(&mac.delimiter), punct!(;)) >>
(TraitItemMacro {
@@ -1497,7 +1497,7 @@
));
impl_synom!(ItemImpl "impl item" do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
defaultness: option!(keyword!(default)) >>
unsafety: option!(keyword!(unsafe)) >>
impl_: keyword!(impl) >>
@@ -1515,7 +1515,7 @@
self_ty: syn!(Type) >>
where_clause: option!(syn!(WhereClause)) >>
inner: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
many0!(ImplItem::parse),
)) >>
(ItemImpl {
@@ -1551,7 +1551,7 @@
));
impl_synom!(ImplItemConst "const item in impl block" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
defaultness: option!(keyword!(default)) >>
const_: keyword!(const) >>
@@ -1576,7 +1576,7 @@
));
impl_synom!(ImplItemMethod "method in impl block" do_parse!(
- outer_attrs: many0!(Attribute::parse_outer) >>
+ outer_attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
defaultness: option!(keyword!(default)) >>
constness: option!(keyword!(const)) >>
@@ -1590,7 +1590,7 @@
ret: syn!(ReturnType) >>
where_clause: option!(syn!(WhereClause)) >>
inner_attrs_stmts: braces!(tuple!(
- many0!(Attribute::parse_inner),
+ many0!(Attribute::old_parse_inner),
call!(Block::parse_within),
)) >>
(ImplItemMethod {
@@ -1627,7 +1627,7 @@
));
impl_synom!(ImplItemType "type in impl block" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
vis: syn!(Visibility) >>
defaultness: option!(keyword!(default)) >>
type_: keyword!(type) >>
@@ -1668,7 +1668,7 @@
));
impl_synom!(ImplItemMacro "macro in impl block" do_parse!(
- attrs: many0!(Attribute::parse_outer) >>
+ attrs: many0!(Attribute::old_parse_outer) >>
mac: syn!(Macro) >>
semi: cond!(!is_brace(&mac.delimiter), punct!(;)) >>
(ImplItemMacro {
diff --git a/src/parse_quote.rs b/src/parse_quote.rs
index ec8ef5a..08ba14b 100644
--- a/src/parse_quote.rs
+++ b/src/parse_quote.rs
@@ -152,9 +152,9 @@
#[cfg(any(feature = "full", feature = "derive"))]
impl ParseQuote for Attribute {
named!(parse -> Self, alt!(
- call!(Attribute::parse_outer)
+ call!(Attribute::old_parse_outer)
|
- call!(Attribute::parse_inner)
+ call!(Attribute::old_parse_inner)
));
fn description() -> Option<&'static str> {
diff --git a/src/synom.rs b/src/synom.rs
index 9c2eb28..d18bd81 100644
--- a/src/synom.rs
+++ b/src/synom.rs
@@ -105,7 +105,7 @@
//!
//! # let tokens = TokenStream::new().into();
//! // Parse zero or more outer attributes but not inner attributes.
-//! named!(outer_attrs -> Vec<Attribute>, many0!(Attribute::parse_outer));
+//! named!(outer_attrs -> Vec<Attribute>, many0!(Attribute::old_parse_outer));
//! let attrs = outer_attrs.parse(tokens)?;
//! #
//! # Ok(())
diff --git a/src/token.rs b/src/token.rs
index 5a8089c..0dd00a2 100644
--- a/src/token.rs
+++ b/src/token.rs
@@ -77,7 +77,7 @@
//! # use super::SynItemStatic as ItemStatic;
//! #
//! # named!(parse -> ItemStatic, do_parse!(
-//! attrs: many0!(Attribute::parse_outer) >>
+//! attrs: many0!(Attribute::old_parse_outer) >>
//! vis: syn!(Visibility) >>
//! static_token: keyword!(static) >>
//! mutability: option!(keyword!(mut)) >>