Skip to content

Commit eeefcd6

Browse files
committed
Remove stream_to_parser.
It's a zero-value wrapper of `Parser::new`.
1 parent a2c6f80 commit eeefcd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parse/macros/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use rustc_ast::token::{Delimiter, NonterminalKind, TokenKind};
22
use rustc_ast::tokenstream::TokenStream;
33
use rustc_ast::{ast, ptr};
44
use rustc_parse::parser::{ForceCollect, Parser, Recovery};
5-
use rustc_parse::{stream_to_parser, MACRO_ARGUMENTS};
5+
use rustc_parse::MACRO_ARGUMENTS;
66
use rustc_session::parse::ParseSess;
77
use rustc_span::symbol::{self, kw};
88
use rustc_span::Symbol;
@@ -15,7 +15,7 @@ pub(crate) mod cfg_if;
1515
pub(crate) mod lazy_static;
1616

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

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

0 commit comments

Comments
 (0)