about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/builtin.rs
diff options
context:
space:
mode:
authorCelina G. Val <celinval@amazon.com>2025-01-27 16:30:02 -0800
committerCelina G. Val <celinval@amazon.com>2025-01-28 11:22:25 -0800
commitc22a27130dde7d7ccf5d76fd021476ddbfdecfa0 (patch)
tree9a4f06c3d8b9a07ba0e2b2b88cc73b923e1cc65d /compiler/rustc_lint/src/builtin.rs
parent2f348cb7ce4063fa4eb40038e6ada3c5214717bd (diff)
downloadrust-c22a27130dde7d7ccf5d76fd021476ddbfdecfa0.tar.gz
rust-c22a27130dde7d7ccf5d76fd021476ddbfdecfa0.zip
Refactor FnKind variant to hold &Fn
Diffstat (limited to 'compiler/rustc_lint/src/builtin.rs')
-rw-r--r--compiler/rustc_lint/src/builtin.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs
index c03de687a33..e8a4e9a84c4 100644
--- a/compiler/rustc_lint/src/builtin.rs
+++ b/compiler/rustc_lint/src/builtin.rs
@@ -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 {