Remove stream_to_parser
.
It's a zero-value wrapper of `Parser::new`.
This commit is contained in:
parent
769ca3f661
commit
3c321b9ea8
7 changed files with 13 additions and 25 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue