diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2024-06-08 18:31:11 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-06-08 21:12:56 +0300 |
commit | 4eb1eb3c4a4d1d3328128d85c490d7384753f004 (patch) | |
tree | 0a01b9becce0b452a6164f858fd76e80c97ce6b7 /mesonbuild | |
parent | 53acb50052af117907bdf1dba019ba0467ebf0e2 (diff) | |
download | meson-4eb1eb3c4a4d1d3328128d85c490d7384753f004.zip meson-4eb1eb3c4a4d1d3328128d85c490d7384753f004.tar.gz meson-4eb1eb3c4a4d1d3328128d85c490d7384753f004.tar.bz2 |
Use helper method in Rust compiler class.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/rust.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 0f52dbb..346a3dd 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -159,7 +159,7 @@ class RustCompiler(Compiler): def get_options(self) -> MutableKeyedOptionDictType: return dict((self.create_option(options.UserComboOption, - OptionKey('std', machine=self.for_machine, lang=self.language), + self.form_langopt_key('std'), 'Rust edition to use', ['none', '2015', '2018', '2021'], 'none'),)) @@ -172,7 +172,7 @@ class RustCompiler(Compiler): def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: args = [] - key = OptionKey('std', machine=self.for_machine, lang=self.language) + key = self.form_langopt_key('std') std = options[key] if std.value != 'none': args.append('--edition=' + std.value) |