diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-06-25 02:03:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-25 02:03:32 +0200 |
| commit | 67db7a2d0553795d004e5e749e3ea73978c6f723 (patch) | |
| tree | a051f230b799dd6f7374cebfa3534f3b30dda400 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 67100f61e62a86f2bf9e38552ee138e231eddc74 (diff) | |
| parent | 4504648090a9b8cae909424826dc4190f23df044 (diff) | |
| download | rust-67db7a2d0553795d004e5e749e3ea73978c6f723.tar.gz rust-67db7a2d0553795d004e5e749e3ea73978c6f723.zip | |
Rollup merge of #72700 - davidtwco:issue-66220-improper-ctypes-declarations, r=lcnr,varkor
`improper_ctypes_definitions` lint
Addresses #19834, #66220, and #66373.
This PR takes another attempt at #65134 (reverted in #66378). Instead of modifying the existing `improper_ctypes` lint to consider `extern "C" fn` definitions in addition to `extern "C" {}` declarations, this PR adds a new lint - `improper_ctypes_definitions` - which only applies to `extern "C" fn` definitions.
In addition, the `improper_ctype_definitions` lint differs from `improper_ctypes` by considering `*T` and `&T` (where `T: Sized`) FFI-safe (addressing #66220).
There wasn't a clear consensus in #66220 (where the issues with #65134 were primarily discussed) on the approach to take, but there has [been some discussion in Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.2366220.20improper_ctypes.20definitions.20vs.20declarations/near/198903086). I fully expect that we'll want to iterate on this before landing.
cc @varkor + @shepmaster (from #19834) @hanna-kruppe (active in discussing #66220), @SimonSapin (#65134 caused problems for Servo, want to make sure that this PR doesn't)
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
