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

Have a way to selectively convert pub type A = B;. #16

Open
Sean1708 opened this issue Dec 8, 2015 · 0 comments
Open

Have a way to selectively convert pub type A = B;. #16

Sean1708 opened this issue Dec 8, 2015 · 0 comments

Comments

@Sean1708
Copy link
Owner

Sean1708 commented Dec 8, 2015

As it stands any typedefs of that form which are not generic will be put into the header, this should cover most use cases but it's not impossible for people to do something like

pub type MyResult = Result<String, ()>;

which would put

typedef Result<String, ()> MyResult;

into the header file.

The two obvious ways to combat this are using #[repr(C)] (which rustc seems to be fine with) or adding a lint group and using #[allow(cheddar_typedef)] (I'm not sure whether this would actually work).

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

No branches or pull requests

1 participant