summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/snippets/rust-2024.md5
-rw-r--r--mesonbuild/compilers/rust.py2
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]: