Skip to content

Commit

Permalink
Auto merge of #128792 - compiler-errors:foreign-sig, r=spastorino
Browse files Browse the repository at this point in the history
Use `FnSig` instead of raw `FnDecl` for `ForeignItemKind::Fn`, fix ICE for `Fn` trait error on safe foreign fn

Let's use `hir::FnSig` instead of `hir::FnDecl + hir::Safety` for `ForeignItemKind::Fn`. This consolidates some handling code between normal fns and foreign fns.

Separetly, fix an ICE where we weren't handling `Fn` trait errors for safe foreign fns.

If perf is bad for the first commit, I can rework the ICE fix to not rely on it. But if perf is good, I prefer we fix and clean up things all at once 👍

r? spastorino

Fixes #128764
  • Loading branch information
bors committed Aug 17, 2024
2 parents 48c94d9 + ad3cedd commit ea76ce0
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit ea76ce0

Please sign in to comment.