From 06bb1d6542a9d07f4d866613a5b039be7bcb5f95 Mon Sep 17 00:00:00 2001 From: Nala Ginrut Date: Fri, 26 Feb 2021 01:13:40 +0800 Subject: Update default configs in ExpansionCfg --- gcc/rust/expand/rust-macro-expand.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/rust/expand/rust-macro-expand.h b/gcc/rust/expand/rust-macro-expand.h index 2e9b88b..89e3171 100644 --- a/gcc/rust/expand/rust-macro-expand.h +++ b/gcc/rust/expand/rust-macro-expand.h @@ -31,13 +31,16 @@ class MacroInvocation; } // Object used to store configuration data for macro expansion. +// NOTE: Keep all these items complying with the latest rustc. struct ExpansionCfg { // features? - unsigned int recursion_limit = 50; // TODO: determine default recursion limit - // trace macros? - // should test? - // more default stuff? + // TODO: Add `features' when we have it. + unsigned int recursion_limit = 1024; + bool trace_mac = false; // trace macro + bool should_test = false; // strip #[test] nodes if false + bool keep_macs = false; // keep macro definitions + std::string crate_name = ""; }; // Object used to store shared data (between functions) for macro expansion. -- cgit v1.1