From 88c85a2dbed5b3fb9b6f2759566d6df5d39e14c7 Mon Sep 17 00:00:00 2001 From: Zekun Wang Date: Tue, 24 Sep 2024 03:07:59 -0400 Subject: [PATCH] refactor --- third_party/move/move-compiler/src/shared/mod.rs | 1 + third_party/move/move-model/src/lib.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/move/move-compiler/src/shared/mod.rs b/third_party/move/move-compiler/src/shared/mod.rs index 2d2c32da5b1f40..9c02542d9035aa 100644 --- a/third_party/move/move-compiler/src/shared/mod.rs +++ b/third_party/move/move-compiler/src/shared/mod.rs @@ -611,6 +611,7 @@ impl Flags { pub fn set_language_version(self, language_version: LanguageVersion) -> Self { Self { language_version, + lang_v2: language_version >= LanguageVersion::V2, ..self } } diff --git a/third_party/move/move-model/src/lib.rs b/third_party/move/move-model/src/lib.rs index a4c1552fb73a3a..fd95f9bf028808 100644 --- a/third_party/move/move-model/src/lib.rs +++ b/third_party/move/move-model/src/lib.rs @@ -118,7 +118,6 @@ pub fn run_model_builder_in_compiler_mode( .set_skip_attribute_checks(skip_attribute_checks) .set_verify(compile_verify_code) .set_keep_testing_functions(compile_test_code) - .set_lang_v2(language_version != LanguageVersion::V1) .set_language_version(match language_version { LanguageVersion::V1 => CompilerLanguageVersion::V1, LanguageVersion::V2_0 => CompilerLanguageVersion::V2_0,