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

Allow warnings for generated code #8

Open
purew opened this issue Jul 19, 2018 · 0 comments
Open

Allow warnings for generated code #8

purew opened this issue Jul 19, 2018 · 0 comments

Comments

@purew
Copy link

purew commented Jul 19, 2018

When the consuming crate defines #![deny(warnings)] compilation fails due to warnings in generated code in rust_lua_ffi:


error: unused import: `std :: collections :: HashSet`
 --> /distil/plt_validate/target/release/build/validate-lua-47afa98c8d312284/out/ffi.rs:3:50
  |
3 | # [ doc ( hidden ) ] pub mod lua_bootstrap { use std :: collections :: HashSet ; use validate :: validate_postback_str_no_panic ; # [ no_mangle ] pub extern "C" fn __lua_bootstrap ( ) -> * mut :: libc :: c_char { let unique_types : :: lua_marshalling :: Dependencies = [ :: lua_marshalling :: make_dependencies :: < & str > ( ) , :: lua_marshalling :: make_dependencies :: < Vec < i32 > >
( ) , ] . into_iter ( ) . flat_map ( | value | value . into_iter ( ) . map ( | ( k , v ) | ( k . clone ( ) , v . clone ( ) ) ) ) .
collect ( ) ; let sorted_types = :: lua_marshalling :: dependency_sorted_type_descriptions ( & unique_types ) ; :: std :: ffi :: CString :: new ( [ r#"-- Code generated by Rust Lua interface. DO NOT EDIT.
  |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This should be avoidable if the generated code defined #![allow(warnings)] in each file.

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