Skip to content

Commit 2d19d36

Browse files
BennoLossinojeda
authored andcommitted
rust: enable the pin_macro feature
This feature enables the use of the `pin!` macro for the `stack_pin_init!` macro. This feature is already stabilized in Rust version 1.68. Signed-off-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com> Acked-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20230408122429.1103522-2-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent ef4dc4c commit 2d19d36

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

rust/kernel/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#![feature(dispatch_from_dyn)]
1919
#![feature(generic_associated_types)]
2020
#![feature(new_uninit)]
21+
#![feature(pin_macro)]
2122
#![feature(receiver_trait)]
2223
#![feature(unsize)]
2324

scripts/Makefile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ $(obj)/%.lst: $(src)/%.c FORCE
277277
# Compile Rust sources (.rs)
278278
# ---------------------------------------------------------------------------
279279

280-
rust_allowed_features := core_ffi_c,new_uninit
280+
rust_allowed_features := core_ffi_c,new_uninit,pin_macro
281281

282282
rust_common_cmd = \
283283
RUST_MODFILE=$(modfile) $(RUSTC_OR_CLIPPY) $(rust_flags) \

0 commit comments

Comments
 (0)