mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Resolve whether $pat is $pat_param or not via 🌟hygiene🌟
This commit is contained in:
parent
7e88fa5d3a
commit
6d1071962f
7 changed files with 158 additions and 54 deletions
|
@ -15,13 +15,12 @@ pub(crate) fn expand_rules(
|
|||
rules: &[crate::Rule],
|
||||
input: &tt::Subtree<Span>,
|
||||
marker: impl Fn(&mut Span) + Copy,
|
||||
is_2021: bool,
|
||||
new_meta_vars: bool,
|
||||
call_site: Span,
|
||||
) -> ExpandResult<tt::Subtree<Span>> {
|
||||
let mut match_: Option<(matcher::Match, &crate::Rule)> = None;
|
||||
for rule in rules {
|
||||
let new_match = matcher::match_(&rule.lhs, input, is_2021);
|
||||
let new_match = matcher::match_(&rule.lhs, input);
|
||||
|
||||
if new_match.err.is_none() {
|
||||
// If we find a rule that applies without errors, we're done.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue