Make the "expensive" comment belong to a branch

This commit is contained in:
Lzu Tao 2024-07-21 00:24:35 +07:00
parent 83b97ae713
commit 925718d8eb

View file

@ -94,8 +94,8 @@ impl<'tcx> LateLintPass<'tcx> for UseSelf {
.as_ref()
.is_none_or(|params| params.parenthesized == GenericArgsParentheses::No)
&& !item.span.from_expansion()
// expensive, should be last check
&& !is_from_proc_macro(cx, item)
// expensive, should be last check
{
// Self cannot be used inside const generic parameters
let types_to_skip = generics