Skip to content

Commit ca2df94

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 a49ebe0 commit ca2df94

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
@@ -22,6 +22,7 @@
2222
#![feature(ptr_sub_ptr)]
2323
#![feature(sized_type_properties)]
2424
#![feature(slice_range)]
25+
#![feature(type_alias_impl_trait)]
2526
// Stable in Rust 1.83
2627
#![feature(const_maybe_uninit_as_mut_ptr)]
2728
#![feature(const_mut_refs)]

scripts/Makefile.build

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

218-
rust_allowed_features := asm_const,asm_goto,arbitrary_self_types,lint_reasons
218+
rust_allowed_features := asm_const,asm_goto,arbitrary_self_types,lint_reasons,type_alias_impl_trait
219219

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

0 commit comments

Comments
 (0)