Skip to content

Commit 8e32eb3

Browse files
Rollup merge of #51502 - jebrosen:pub_parse_methods, r=Mark-Simulacrum
Make parse_seq_to_end and parse_path public (see rwf2/Rocket#660, #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.
2 parents b610d91 + 7e56261 commit 8e32eb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsyntax/parse/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ impl<'a> Parser<'a> {
10221022
/// Parse a sequence, including the closing delimiter. The function
10231023
/// f must consume tokens until reaching the next separator or
10241024
/// closing bracket.
1025-
crate fn parse_seq_to_end<T, F>(&mut self,
1025+
pub fn parse_seq_to_end<T, F>(&mut self,
10261026
ket: &token::Token,
10271027
sep: SeqSep,
10281028
f: F)
@@ -1886,7 +1886,7 @@ impl<'a> Parser<'a> {
18861886
/// `a::b::C::<D>` (with disambiguator)
18871887
/// `Fn(Args)` (without disambiguator)
18881888
/// `Fn::(Args)` (with disambiguator)
1889-
crate fn parse_path(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
1889+
pub fn parse_path(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
18901890
self.parse_path_common(style, true)
18911891
}
18921892

0 commit comments

Comments
 (0)