Skip to content

Commit b896e78

Browse files
antonio-hickeyintel-lab-lkp
authored andcommitted
rust: enable raw_ref_op feature
Since Rust 1.82.0 the `raw_ref_op` feature is stable. By enabling this feature we can use `&raw place` and `&raw mut place` instead of using `addr_of!(place)` and `addr_of_mut!(place)` macros. This will allow us to reduce macro complexity, and improve consistency with existing reference syntax as `&raw`, `&raw mut` is very similar to `&`, `&mut` making it fit more naturally with other existing code. Suggested-by: Benno Lossin <[email protected]> Link: Rust-for-Linux#1148 Signed-off-by: Antonio Hickey <[email protected]>
1 parent ab2ebb7 commit b896e78

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rust/kernel/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#![cfg_attr(not(CONFIG_RUSTC_HAS_COERCE_POINTEE), feature(unsize))]
2020
#![feature(inline_const)]
2121
#![feature(lint_reasons)]
22+
// Stable in Rust 1.82
23+
#![feature(raw_ref_op)]
2224
// Stable in Rust 1.83
2325
#![feature(const_maybe_uninit_as_mut_ptr)]
2426
#![feature(const_mut_refs)]

0 commit comments

Comments
 (0)