Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Temporarily override the improper_ctypes warning #62. #67

Closed
wants to merge 1 commit into from

Conversation

rthomas
Copy link
Contributor

@rthomas rthomas commented Jul 24, 2017

The remaining warnings are from types in
core-foundation(CGAffineTransform) and core-graphics(CFNumberRef). When
they are rectified the warnings can be turned back on.


This change is Reviewable

The remaining warnings are from types in
core-foundation(CGAffineTransform) and core-graphics(CFNumberRef). When
they are rectified the warnings can be turned back on.
@rthomas
Copy link
Contributor Author

rthomas commented Jul 24, 2017

I really dislike this solution, but I want to dig into the warnings produced by core-foundation and core-graphics first.

I'll need some guidance on the core-foundation work, as this commit reverts the foundation structs to tuple-structs, which seem to be the root cause of the warning.

Alternatively I can investigate whether tuple-structs should actually be triggering this warning to begin with: found zero-size struct in foreign module, consider adding a member to this struct.

@jdm
Copy link
Member

jdm commented Jul 24, 2017

We already have the warnings present; why do we need to hide them while we investigate errors in other repositories?

@jdm
Copy link
Member

jdm commented Jul 24, 2017

And yes, I think it would be worth talking with the Rust compiler developers about whether types like this should be considered FFI-unsafe:

struct Foo;
struct FooRef(*const Foo);

@jdm
Copy link
Member

jdm commented Jul 24, 2017

In fact, the discussion in rust-lang/rust#34798 may be relevant.

@jdm
Copy link
Member

jdm commented Jul 24, 2017

Similarly, rust-lang/rust#27303.

@rthomas
Copy link
Contributor Author

rthomas commented Jul 24, 2017

Yeah fair call - I can cancel this PR.

I was reading that discussion along with rust-lang/rust#27303.

It seems odd that the zero-size struct warning is firing for tuple-structs.

@rthomas
Copy link
Contributor Author

rthomas commented Jul 24, 2017

Closing. Warnings are from core-foundation and core-graphics types.

@rthomas rthomas closed this Jul 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants