summaryrefslogtreecommitdiff
path: root/mesonbuild/cargo/interpreter.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-05-29 15:46:23 +0200
committerDylan Baker <dylan@pnwbakers.com>2025-05-30 11:37:38 -0700
commit7c2f22feefe2d8014138b02a2119026a01f52dea (patch)
treebf9e374a8deaaa3d43e3d3adb3bfc57998ddf382 /mesonbuild/cargo/interpreter.py
parent7d567901de40a6a0e837dc49de9662998df46424 (diff)
downloadmeson-7c2f22feefe2d8014138b02a2119026a01f52dea.tar.gz
cargo: set edition for build machine as well
This fixes compilation of glib-macros-0.20.4: error[E0405]: cannot find trait `TryFrom` in this scope --> ../subprojects/glib-macros-0.20.4/src/clone.rs:22:10 | 22 | impl<'a> TryFrom<&'a Ident> for CaptureKind { | ^^^^^^^ not found in this scope | = note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021 help: consider importing this trait | 3 + use std::convert::TryFrom; | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/cargo/interpreter.py')
-rw-r--r--mesonbuild/cargo/interpreter.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/cargo/interpreter.py b/mesonbuild/cargo/interpreter.py
index af272a86f..78bce95d2 100644
--- a/mesonbuild/cargo/interpreter.py
+++ b/mesonbuild/cargo/interpreter.py
@@ -608,6 +608,7 @@ class Interpreter:
"""
default_options: T.List[mparser.BaseNode] = []
default_options.append(build.string(f'rust_std={pkg.manifest.package.edition}'))
+ default_options.append(build.string(f'build.rust_std={pkg.manifest.package.edition}'))
if pkg.downloaded:
default_options.append(build.string('warning_level=0'))