1
Fork 0

Remove stream_to_parser.

It's a zero-value wrapper of `Parser::new`.
This commit is contained in:
Nicholas Nethercote 2024-05-31 13:32:54 +10:00
parent 769ca3f661
commit 3c321b9ea8
7 changed files with 13 additions and 25 deletions

View file

@ -196,7 +196,7 @@ impl CfgEval<'_, '_> {
// Re-parse the tokens, setting the `capture_cfg` flag to save extra information
// to the captured `AttrTokenStream` (specifically, we capture
// `AttrTokenTree::AttributesData` for all occurrences of `#[cfg]` and `#[cfg_attr]`)
let mut parser = rustc_parse::stream_to_parser(&self.cfg.sess.psess, orig_tokens, None);
let mut parser = Parser::new(&self.cfg.sess.psess, orig_tokens, None);
parser.capture_cfg = true;
match parse_annotatable_with(&mut parser) {
Ok(a) => annotatable = a,