Make flatc generate Rust files not requiring std (#7273)

* Set an explicit 2018 edition for Rust tests

* Replace all `std` usage with `core` and `alloc` in Rust code generator

* Update the generated files

* Make Rust tests actually use no_std when the corresponding feature is enabled
This commit is contained in:
Bogdan Opanchuk
2022-04-26 18:40:03 -07:00
committed by GitHub
parent 9917a168cd
commit 750dde7669
88 changed files with 799 additions and 430 deletions

View File

@@ -1,3 +1,8 @@
extern crate alloc;
use alloc::string::ToString;
use alloc::vec::Vec;
#[allow(dead_code, unused_imports)]
#[path = "../../more_defaults/mod.rs"]
mod more_defaults_generated;