diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-31 13:56:44 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-06-05 10:38:02 +1000 |
| commit | 25972aec67e900aeefe4014deecf5ef853a4bab4 (patch) | |
| tree | e6dc05ce5a99da1034a9f14be016cb480894994b /compiler/rustc_parse/src/parser | |
| parent | 8964106e44c39cced6cc039bf512a69513a2bbe5 (diff) | |
| download | rust-25972aec67e900aeefe4014deecf5ef853a4bab4.tar.gz rust-25972aec67e900aeefe4014deecf5ef853a4bab4.zip | |
Inline and remove `parse_crate{,_attrs}_from_{file,source_str}`.
All four functions are simple and have a single call site. This requires making `Parser::parse_inner_attributes` public, which is no big deal.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs index a57eb70c705..4acc610d8c4 100644 --- a/compiler/rustc_parse/src/parser/attr.rs +++ b/compiler/rustc_parse/src/parser/attr.rs @@ -265,7 +265,7 @@ impl<'a> Parser<'a> { /// terminated by a semicolon. /// /// Matches `inner_attrs*`. - pub(crate) fn parse_inner_attributes(&mut self) -> PResult<'a, ast::AttrVec> { + pub fn parse_inner_attributes(&mut self) -> PResult<'a, ast::AttrVec> { let mut attrs = ast::AttrVec::new(); loop { let start_pos: u32 = self.num_bump_calls.try_into().unwrap(); |
