diff mbox series

[RFC,2/2] rust: Specify Rust edition by rust_std=20XX

Message ID 20240814090820.1251026-3-junjie.mao@intel.com (mailing list archive)
State New, archived
Headers show
Series meson: Specify Rust edition by rust_std=20XX | expand

Commit Message

Junjie Mao Aug. 14, 2024, 9:08 a.m. UTC
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
---
 rust/hw/char/pl011/meson.build | 4 +---
 rust/meson.build               | 4 +---
 rust/qemu-api/meson.build      | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

--
2.30.2
diff mbox series

Patch

diff --git a/rust/hw/char/pl011/meson.build b/rust/hw/char/pl011/meson.build
index 1c139d3af9..518d4924a9 100644
--- a/rust/hw/char/pl011/meson.build
+++ b/rust/hw/char/pl011/meson.build
@@ -7,10 +7,8 @@  bilge_impl_dep = dependency('bilge-impl-0.2-rs')
 _libpl011_rs = static_library(
   'pl011',
   files('src/lib.rs'),
+  override_options: ['rust_std=2021', 'build.rust_std=2021'],
   rust_abi: 'c',
-  rust_args: rust_args + [
-    '--edition', '2021',
-  ],
   dependencies: [
     bilge_dep,
     bilge_impl_dep,
diff --git a/rust/meson.build b/rust/meson.build
index c321fa455e..590e9397c3 100644
--- a/rust/meson.build
+++ b/rust/meson.build
@@ -2,10 +2,8 @@  _lib_bindings_rs = static_library(
   '_bindings_rs',
   bindings_rs,
   gnu_symbol_visibility: 'hidden',
+  override_options: ['rust_std=2021', 'build.rust_std=2021'],
   rust_abi: 'rust',
-  rust_args: rust_args + [
-    '--edition', '2021',
-  ],
 )

 subdir('qemu-api')
diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build
index a169872026..997d478309 100644
--- a/rust/qemu-api/meson.build
+++ b/rust/qemu-api/meson.build
@@ -2,9 +2,9 @@  _qemu_api_rs = static_library(
   'qemu_api',
   [files('src/lib.rs')],
   gnu_symbol_visibility: 'hidden',
+  override_options: ['rust_std=2021', 'build.rust_std=2021'],
   rust_abi: 'rust',
   rust_args: rust_args + [
-    '--edition', '2021',
     '--cfg', 'MESON_BINDINGS_RS',
   ],
   link_with: [