Remove old mod style path parsing
diff --git a/src/data.rs b/src/data.rs
index 0fa08e4..d755d83 100644
--- a/src/data.rs
+++ b/src/data.rs
@@ -293,7 +293,7 @@
pub_token: pub_token,
paren_token: parenthesized!(content in input),
in_token: Some(content.parse()?),
- path: Box::new(content.parse_synom(Path::old_parse_mod_style)?),
+ path: Box::new(content.call(Path::parse_mod_style)?),
}));
}
}
diff --git a/src/path.rs b/src/path.rs
index b670d92..fd85c21 100644
--- a/src/path.rs
+++ b/src/path.rs
@@ -399,16 +399,6 @@
},
})
}
-
- named!(pub old_parse_mod_style -> Self, do_parse!(
- colon: option!(punct!(::)) >>
- segments: call!(Punctuated::parse_separated_nonempty_with,
- old_mod_style_path_segment) >>
- (Path {
- leading_colon: colon,
- segments: segments,
- })
- ));
}
pub fn qpath(input: ParseStream, expr_style: bool) -> Result<(Option<QSelf>, Path)> {
@@ -463,43 +453,6 @@
}
}
- // FIXME
- /*
- pub fn mod_style_path_segment(input: ParseStream) -> Result<PathSegment> {
- let lookahead = input.lookahead1();
- let ident = if lookahead.peek(Ident) {
- input.parse()?
- } else if lookahead.peek(Token![super]) {
- Ident::from(input.parse::<Token![super]>()?)
- } else if lookahead.peek(Token![self]) {
- Ident::from(input.parse::<Token![self]>()?)
- } else if lookahead.peek(Token![Self]) {
- Ident::from(input.parse::<Token![Self]>()?)
- } else if lookahead.peek(Token![crate]) {
- Ident::from(input.parse::<Token![crate]>()?)
- } else if lookahead.peek(Token![extern]) {
- Ident::from(input.parse::<Token![extern]>()?)
- } else {
- return Err(lookahead.error());
- };
- Ok(PathSegment::from(ident))
- }
- */
-
- named!(pub old_mod_style_path_segment -> PathSegment, alt!(
- syn!(Ident) => { Into::into }
- |
- keyword!(super) => { Into::into }
- |
- keyword!(self) => { Into::into }
- |
- keyword!(Self) => { Into::into }
- |
- keyword!(crate) => { Into::into }
- |
- keyword!(extern) => { Into::into }
- ));
-
named!(pub ty_no_eq_after -> Type, do_parse!(
ty: syn!(Type) >>
not!(punct!(=)) >>