Skip to content

Commit ad6dc83

Browse files
committed
rust: added extern crate self as kernel
This allows proc macros to refer to `::kernel`. This syntax is needed in order to ensure that we refer to the true kernel crate instead of a local module. Signed-off-by: Benno Lossin <[email protected]>
1 parent efcbaca commit ad6dc83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rust/kernel/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
#[cfg(not(CONFIG_RUST))]
3535
compile_error!("Missing kernel configuration for conditional compilation");
3636

37+
// allow macros to refer to `::kernel`.
38+
extern crate self as kernel;
39+
3740
#[cfg(not(test))]
3841
#[cfg(not(testlib))]
3942
mod allocator;

0 commit comments

Comments
 (0)