Skip to content

Allow warnings for generated code #8

@purew

Description

@purew

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions