1
Fork 0

Rollup merge of #136164 - celinval:chores-fnkind, r=oli-obk

Refactor FnKind variant to hold &Fn

Pulling the change suggested in #128045 to reduce the impact of changing `Fn` item.

r? `@oli-obk`
This commit is contained in:
León Orell Valerian Liehr 2025-01-29 03:12:22 +01:00 committed by GitHub
commit 28393070ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 93 additions and 91 deletions

View file

@ -330,10 +330,12 @@ impl EarlyLintPass for UnsafeCode {
if let FnKind::Fn(
ctxt,
_,
ast::FnSig { header: ast::FnHeader { safety: ast::Safety::Unsafe(_), .. }, .. },
_,
_,
body,
ast::Fn {
sig: ast::FnSig { header: ast::FnHeader { safety: ast::Safety::Unsafe(_), .. }, .. },
body,
..
},
) = fk
{
let decorator = match ctxt {