-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: skip checking token tree count for include! macro call #15819
Conversation
Thanks a lot, I was actually planning to look into this! |
@bors r+ |
☀️ Test successful - checks-actions |
let skip_check_tt_count = match loc.kind { | ||
MacroCallKind::FnLike { ast_id, expand_to: _ } => { | ||
if let Some(name_ref) = | ||
ast_id.to_node(db).path().and_then(|p| p.segment()).and_then(|s| s.name_ref()) | ||
{ | ||
name_ref.as_name() == name!(include) | ||
} else { | ||
false | ||
} | ||
} | ||
_ => false, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should check that the loc.def
is the builtin include macro instead of doing a name check. Otherwise any macro called include
skips the token limit check
Improve check for include macro #15819 (review)
fix #15335 #15648