about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2018-06-12 11:22:53 -0600
committerGitHub <noreply@github.com>2018-06-12 11:22:53 -0600
commit1e06b1757c843c4cda538327dbd325378c539bfe (patch)
treef3822bfcc4b466fccb6b014fe45007c06803f677 /src/libsyntax/parse
parent2b21f66bebdb0685119b300ed21a15ae9dae22ab (diff)
parent7e56261fcbdaa8d039ee507911f8e5e886de1e41 (diff)
downloadrust-1e06b1757c843c4cda538327dbd325378c539bfe.tar.gz
rust-1e06b1757c843c4cda538327dbd325378c539bfe.zip
Rollup merge of #51502 - jebrosen:pub_parse_methods, r=Mark-Simulacrum
Make parse_seq_to_end and parse_path public

(see SergioBenitez/Rocket#660, rust-lang/rust#51265)

Rocket currently uses `parse_seq_to_end` and `parse_path` in its codegen macros. Assuming I tested correctly, this is the minimal set of methods that are currently necessary to build Rocket again. I would be happy to add documentation of this and Rocket's other usages, if desired.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 092564d158f..e1f920c16fd 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1022,7 +1022,7 @@ impl<'a> Parser<'a> {
     /// Parse a sequence, including the closing delimiter. The function
     /// f must consume tokens until reaching the next separator or
     /// closing bracket.
-    crate fn parse_seq_to_end<T, F>(&mut self,
+    pub fn parse_seq_to_end<T, F>(&mut self,
                                   ket: &token::Token,
                                   sep: SeqSep,
                                   f: F)
@@ -1886,7 +1886,7 @@ impl<'a> Parser<'a> {
     /// `a::b::C::<D>` (with disambiguator)
     /// `Fn(Args)` (without disambiguator)
     /// `Fn::(Args)` (with disambiguator)
-    crate fn parse_path(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
+    pub fn parse_path(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
         self.parse_path_common(style, true)
     }