Auto merge of #12942 - Jarcho:ex_proc_macro, r=Manishearth

Add more types to `is_from_proc_macro`

I've been running through going through all the lint implementations to clean them up. I'll be separating out the changes into small PRs to make reviewing easier.

changelog: none
This commit is contained in:
bors 2024-06-18 23:45:47 +00:00
commit 29cc5c691c
3 changed files with 44 additions and 44 deletions

View file

@ -57,7 +57,7 @@ impl LateLintPass<'_> for AllowAttribute {
&& let AttrStyle::Outer = attr.style
&& let Some(ident) = attr.ident()
&& ident.name == rustc_span::symbol::sym::allow
&& !is_from_proc_macro(cx, &attr)
&& !is_from_proc_macro(cx, attr)
{
span_lint_and_sugg(
cx,

View file

@ -22,7 +22,7 @@ pub(super) fn check<'cx>(cx: &LateContext<'cx>, name: Symbol, items: &[NestedMet
}
// Check if the attribute is in an external macro and therefore out of the developer's control
if in_external_macro(cx.sess(), attr.span) || is_from_proc_macro(cx, &attr) {
if in_external_macro(cx.sess(), attr.span) || is_from_proc_macro(cx, attr) {
return;
}