Skip to content

Commit

Permalink
Remove stream_to_parser.
Browse files Browse the repository at this point in the history
It's a zero-value wrapper of `Parser::new`.
  • Loading branch information
nnethercote committed Jun 5, 2024
1 parent a2c6f80 commit eeefcd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parse/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 2,7 @@ use rustc_ast::token::{Delimiter, NonterminalKind, TokenKind};
use rustc_ast::tokenstream::TokenStream;
use rustc_ast::{ast, ptr};
use rustc_parse::parser::{ForceCollect, Parser, Recovery};
use rustc_parse::{stream_to_parser, MACRO_ARGUMENTS};
use rustc_parse::MACRO_ARGUMENTS;
use rustc_session::parse::ParseSess;
use rustc_span::symbol::{self, kw};
use rustc_span::Symbol;
Expand All @@ -15,7 15,7 @@ pub(crate) mod cfg_if;
pub(crate) mod lazy_static;

fn build_stream_parser<'a>(psess: &'a ParseSess, tokens: TokenStream) -> Parser<'a> {
stream_to_parser(psess, tokens, MACRO_ARGUMENTS).recovery(Recovery::Forbidden)
Parser::new(psess, tokens, MACRO_ARGUMENTS).recovery(Recovery::Forbidden)
}

fn build_parser<'a>(context: &RewriteContext<'a>, tokens: TokenStream) -> Parser<'a> {
Expand Down

0 comments on commit eeefcd6

Please sign in to comment.