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

@@ -14,9 +14,8 @@
* limitations under the License.
*/
use bencher::{benchmark_group, Bencher};
use flatbuffers;
use bencher::Bencher;
#[allow(dead_code, unused_imports)]
#[path = "../../monster_test/mod.rs"]

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use bencher::Bencher;
use bencher::{benchmark_group, benchmark_main, Bencher};
use flexbuffers::*;
fn push_vec_u64_to_map(b: &mut Bencher) {