commit | f36af87babc4b398c4f735cc3d451e6b1393be82 | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sat Jun 30 23:07:21 2018 -0700 |
committer | David Tolnay <dtolnay@gmail.com> | Sat Jun 30 23:16:08 2018 -0700 |
tree | 1b13f5b5f73f797f6b673b7b9a2ba2a1001a612b | |
parent | 72283c16c34fb755d3cb91a5f43164b6a221de4b [diff] [blame] |
Parse crate::X in newtype as (crate::X) not crate(::X)
diff --git a/src/data.rs b/src/data.rs index fbbdb70..3d1924a 100644 --- a/src/data.rs +++ b/src/data.rs
@@ -261,11 +261,13 @@ })) ) | - keyword!(crate) => { |tok| { - Visibility::Crate(VisCrate { - crate_token: tok, - }) - } } + do_parse!( + crate_token: keyword!(crate) >> + not!(punct!(::)) >> + (Visibility::Crate(VisCrate { + crate_token: crate_token, + })) + ) | do_parse!( pub_token: keyword!(pub) >>