aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-session-manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/rust-session-manager.h')
-rw-r--r--gcc/rust/rust-session-manager.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/rust/rust-session-manager.h b/gcc/rust/rust-session-manager.h
index 99d1628..c5420db 100644
--- a/gcc/rust/rust-session-manager.h
+++ b/gcc/rust/rust-session-manager.h
@@ -184,6 +184,13 @@ struct CompileOptions
bool enable_test = false;
bool debug_assertions = false;
bool proc_macro = false;
+ enum Edition
+ {
+ E2015 = 0,
+ E2018,
+ E2021,
+ } edition
+ = E2015;
bool dump_option_enabled (DumpOption option) const
{
@@ -211,6 +218,11 @@ struct CompileOptions
crate_name = std::move (name);
return true;
}
+
+ void set_edition (int raw_edition)
+ {
+ edition = static_cast<Edition> (raw_edition);
+ }
};
/* Defines a compiler session. This is for a single compiler invocation, so