mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Rust: remove inner attributes (#6410)
* remove inner attributes * Added test for outdir in Rust * add bin/outdir * Moved outdir test to its own package and only run it if flatc is available Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -2497,7 +2497,9 @@ class RustGenerator : public BaseGenerator {
|
||||
}
|
||||
|
||||
void GenNamespaceImports(const int white_spaces) {
|
||||
if (white_spaces == 0) { code_ += "#![allow(unused_imports, dead_code)]"; }
|
||||
// DO not use global attributes (i.e. #![...]) since it interferes
|
||||
// with users who include! generated files.
|
||||
// See: https://github.com/google/flatbuffers/issues/6261
|
||||
std::string indent = std::string(white_spaces, ' ');
|
||||
code_ += "";
|
||||
if (!parser_.opts.generate_all) {
|
||||
|
||||
Reference in New Issue
Block a user