be01b983c4
Significantly optimize `significant_drop_tightening` The lint is very slow as it doesn't cache the deeply nested check for the attribute. If we cache it, we can reduce the time spent on checking `rustc_borrowck` from 28s to 9s, which is a nice improvement. In the profile, the time inside `has_sig_drop_attr` goes from 66% to 0.2%, which is a lot more reasonable. <details> <summary>Flame graphs</summary> Before (all the tall `clippy` towers are `has_sig_drop_attr`): ![before](https://user-images.githubusercontent.com/48135649/227037243-bcd93bbe-a4ad-45c3-be25-2b021b12a5c0.svg) After: ![after](https://user-images.githubusercontent.com/48135649/227040322-8d3f0448-18e3-4923-8187-c72df324a3fa.svg) </details> Fixes #10532 changelog: [`significant_drop_tightening`]: significantly optimized