Skip to content

Commit 39c84e7

Browse files
hoshinolinajannau
authored andcommitted
rust: Enable type_alias_impl_trait
This is required to make PinInit<T> work as a return value from a trait function. We indirect via an associated type to avoid return_position_impl_trait_in_trait, which is an incomplete feature. Signed-off-by: Asahi Lina <lina@asahilina.net>
1 parent 6f36c32 commit 39c84e7

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
@@ -21,6 +21,7 @@
2121
#![feature(ptr_sub_ptr)]
2222
#![feature(sized_type_properties)]
2323
#![feature(slice_range)]
24+
#![feature(type_alias_impl_trait)]
2425
#![feature(unsize)]
2526
#![allow(stable_features)]
2627
// Stable in Rust 1.83

scripts/Makefile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ $(obj)/%.lst: $(obj)/%.c FORCE
248248
# Compile Rust sources (.rs)
249249
# ---------------------------------------------------------------------------
250250

251-
rust_allowed_features := arbitrary_self_types,lint_reasons
251+
rust_allowed_features := arbitrary_self_types,lint_reasons,type_alias_impl_trait
252252

253253
# `--out-dir` is required to avoid temporaries being created by `rustc` in the
254254
# current working directory, which may be not accessible in the out-of-tree

0 commit comments

Comments
 (0)