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.
This commit is contained in:
commit
1e06b1757c
1 changed files with 2 additions and 2 deletions
|
@ -1022,7 +1022,7 @@ impl<'a> Parser<'a> {
|
||||||
/// Parse a sequence, including the closing delimiter. The function
|
/// Parse a sequence, including the closing delimiter. The function
|
||||||
/// f must consume tokens until reaching the next separator or
|
/// f must consume tokens until reaching the next separator or
|
||||||
/// closing bracket.
|
/// 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,
|
ket: &token::Token,
|
||||||
sep: SeqSep,
|
sep: SeqSep,
|
||||||
f: F)
|
f: F)
|
||||||
|
@ -1886,7 +1886,7 @@ impl<'a> Parser<'a> {
|
||||||
/// `a::b::C::<D>` (with disambiguator)
|
/// `a::b::C::<D>` (with disambiguator)
|
||||||
/// `Fn(Args)` (without disambiguator)
|
/// `Fn(Args)` (without disambiguator)
|
||||||
/// `Fn::(Args)` (with 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)
|
self.parse_path_common(style, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue