diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-01-08 08:15:55 +0100 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-01-08 16:33:49 +0200 |
| commit | b0827fc1e2c5d989fa57dc7d91ba330dffaaf0aa (patch) | |
| tree | bd56beb571fb6a99f87b4524c90190d0de12c7f3 | |
| parent | 7a8a89aab24d7942569b47585ee8e2fddc5692a5 (diff) | |
| download | meson-b0827fc1e2c5d989fa57dc7d91ba330dffaaf0aa.tar.gz | |
rust: add 2024 edition
Rust edition 2024 is being released in February, add support for rust_std=2024.
Resolves: #14074
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | docs/markdown/snippets/rust-2024.md | 5 | ||||
| -rw-r--r-- | mesonbuild/compilers/rust.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/markdown/snippets/rust-2024.md b/docs/markdown/snippets/rust-2024.md new file mode 100644 index 000000000..b1334d326 --- /dev/null +++ b/docs/markdown/snippets/rust-2024.md @@ -0,0 +1,5 @@ +## Support for Rust 2024 + +Meson can now request the compiler to use the 2024 edition of Rust. Use +`rust_std=2024` to activate it. Rust 2024 requires the 1.85.0 version +(or newer) of the compiler. diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index bc3f4cb6c..6b9edb05d 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -223,7 +223,7 @@ class RustCompiler(Compiler): return dict((self.create_option(options.UserComboOption, self.form_compileropt_key('std'), 'Rust edition to use', - ['none', '2015', '2018', '2021'], + ['none', '2015', '2018', '2021', '2024'], 'none'),)) def get_dependency_compile_args(self, dep: 'Dependency') -> T.List[str]: |
