Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the improper_ctypes lint more robust #20311

Closed

Conversation

tomjakubowski
Copy link
Contributor

It now checks extern fns in addition to foreign fns and checks DefStruct
defs as well.

There is room for improvement: for example, I believe that pointers
should be safe in extern fn signatures regardless of the pointee's
representation.

The FIXME on rust_begin_unwind_fmt is because I don't think it
should be, or needs to be, C ABI (cc @eddyb) and it takes a problematic
fmt::Arguments structure by value.

Fix #20098, fix #19834

@rust-highfive
Copy link
Collaborator

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

It now checks extern fns in addition to foreign fns and checks `DefStruct`
defs as well.

There is room for improvement: for example, I believe that pointers
should be safe in extern fn signatures regardless of the pointee's
representation.

The `FIXME` on `rust_begin_unwind_fmt` is because I don't think it
should be, or needs to be, C ABI (cc @eddyb) and it takes a problematic
`fmt::Arguments` structure by value.

Fix rust-lang#20098, fix rust-lang#19834
@eddyb
Copy link
Member

eddyb commented Dec 29, 2014

I think the issue with rust_begin_unwind_fmt is that extern "Rust" {...} is not really supported.

@alexcrichton
Copy link
Member

Yes I think it's fine to remove the FIXME but leave the allow for now. As lang items we're in control of the actual ABI regardless and I believe we translate it into the "Rust" ABI under the hood.

@alexcrichton
Copy link
Member

Closing due to inactivity, but feel free to reopen with a rebase!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants