remove unused parameters
This commit is contained in:
parent
b7820b2893
commit
9a020186f8
@ -371,10 +371,6 @@ pub fn compile_declarative_macro(
|
|||||||
tt.clone().into(),
|
tt.clone().into(),
|
||||||
true,
|
true,
|
||||||
sess,
|
sess,
|
||||||
features,
|
|
||||||
&def.attrs,
|
|
||||||
edition,
|
|
||||||
def.id,
|
|
||||||
)
|
)
|
||||||
.pop()
|
.pop()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
@ -398,10 +394,6 @@ pub fn compile_declarative_macro(
|
|||||||
tt.clone().into(),
|
tt.clone().into(),
|
||||||
false,
|
false,
|
||||||
sess,
|
sess,
|
||||||
features,
|
|
||||||
&def.attrs,
|
|
||||||
edition,
|
|
||||||
def.id,
|
|
||||||
)
|
)
|
||||||
.pop()
|
.pop()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
use crate::ast;
|
use crate::ast;
|
||||||
use crate::ast::NodeId;
|
|
||||||
use crate::ext::mbe::macro_parser;
|
use crate::ext::mbe::macro_parser;
|
||||||
use crate::ext::mbe::{TokenTree, KleeneOp, KleeneToken, SequenceRepetition, Delimited};
|
use crate::ext::mbe::{TokenTree, KleeneOp, KleeneToken, SequenceRepetition, Delimited};
|
||||||
use crate::feature_gate::Features;
|
|
||||||
use crate::parse::token::{self, Token};
|
use crate::parse::token::{self, Token};
|
||||||
use crate::parse::ParseSess;
|
use crate::parse::ParseSess;
|
||||||
use crate::print::pprust;
|
use crate::print::pprust;
|
||||||
use crate::symbol::kw;
|
use crate::symbol::kw;
|
||||||
use crate::tokenstream;
|
use crate::tokenstream;
|
||||||
|
|
||||||
use syntax_pos::{edition::Edition, Span};
|
use syntax_pos::Span;
|
||||||
|
|
||||||
use rustc_data_structures::sync::Lrc;
|
use rustc_data_structures::sync::Lrc;
|
||||||
use std::iter::Peekable;
|
use std::iter::Peekable;
|
||||||
@ -39,10 +37,6 @@ pub(super) fn parse(
|
|||||||
input: tokenstream::TokenStream,
|
input: tokenstream::TokenStream,
|
||||||
expect_matchers: bool,
|
expect_matchers: bool,
|
||||||
sess: &ParseSess,
|
sess: &ParseSess,
|
||||||
features: &Features,
|
|
||||||
attrs: &[ast::Attribute],
|
|
||||||
edition: Edition,
|
|
||||||
macro_node_id: NodeId,
|
|
||||||
) -> Vec<TokenTree> {
|
) -> Vec<TokenTree> {
|
||||||
// Will contain the final collection of `self::TokenTree`
|
// Will contain the final collection of `self::TokenTree`
|
||||||
let mut result = Vec::new();
|
let mut result = Vec::new();
|
||||||
@ -58,10 +52,6 @@ pub(super) fn parse(
|
|||||||
&mut trees,
|
&mut trees,
|
||||||
expect_matchers,
|
expect_matchers,
|
||||||
sess,
|
sess,
|
||||||
features,
|
|
||||||
attrs,
|
|
||||||
edition,
|
|
||||||
macro_node_id,
|
|
||||||
);
|
);
|
||||||
match tree {
|
match tree {
|
||||||
TokenTree::MetaVar(start_sp, ident) if expect_matchers => {
|
TokenTree::MetaVar(start_sp, ident) if expect_matchers => {
|
||||||
@ -112,10 +102,6 @@ fn parse_tree(
|
|||||||
trees: &mut Peekable<impl Iterator<Item = tokenstream::TokenTree>>,
|
trees: &mut Peekable<impl Iterator<Item = tokenstream::TokenTree>>,
|
||||||
expect_matchers: bool,
|
expect_matchers: bool,
|
||||||
sess: &ParseSess,
|
sess: &ParseSess,
|
||||||
features: &Features,
|
|
||||||
attrs: &[ast::Attribute],
|
|
||||||
edition: Edition,
|
|
||||||
macro_node_id: NodeId,
|
|
||||||
) -> TokenTree {
|
) -> TokenTree {
|
||||||
// Depending on what `tree` is, we could be parsing different parts of a macro
|
// Depending on what `tree` is, we could be parsing different parts of a macro
|
||||||
match tree {
|
match tree {
|
||||||
@ -135,10 +121,6 @@ fn parse_tree(
|
|||||||
tts.into(),
|
tts.into(),
|
||||||
expect_matchers,
|
expect_matchers,
|
||||||
sess,
|
sess,
|
||||||
features,
|
|
||||||
attrs,
|
|
||||||
edition,
|
|
||||||
macro_node_id,
|
|
||||||
);
|
);
|
||||||
// Get the Kleene operator and optional separator
|
// Get the Kleene operator and optional separator
|
||||||
let (separator, kleene) = parse_sep_and_kleene_op(trees, span.entire(), sess);
|
let (separator, kleene) = parse_sep_and_kleene_op(trees, span.entire(), sess);
|
||||||
@ -192,10 +174,6 @@ fn parse_tree(
|
|||||||
tts.into(),
|
tts.into(),
|
||||||
expect_matchers,
|
expect_matchers,
|
||||||
sess,
|
sess,
|
||||||
features,
|
|
||||||
attrs,
|
|
||||||
edition,
|
|
||||||
macro_node_id,
|
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user