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

Add #![allow(dead_code)] in generated *.rs files #34

Closed
hicqu opened this issue Mar 17, 2017 · 2 comments
Closed

Add #![allow(dead_code)] in generated *.rs files #34

hicqu opened this issue Mar 17, 2017 · 2 comments

Comments

@hicqu
Copy link

hicqu commented Mar 17, 2017

There are a lot of method is never used: Something when cargo build.

So, I think we need #![allow(dead_code)]. What do you think?

@dwrensha
Copy link
Member

Unfortunately, putting #![allow(dead_code)] at the top of generated files would interfere with include!(): rust-lang/rust#18810

We could put #[allow(dead_code)] on every generated item, but that seems ugly.

So, I recommend that you add the #[allow(dead_code)] attribute yourself, at the location in the code where you include!() the generated code.

@hicqu
Copy link
Author

hicqu commented Mar 18, 2017

OK, I will try do that in build.rs. Thank you!

@hicqu hicqu closed this as completed Mar 18, 2017
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

2 participants