cea93f7647
Or to be precise: RUST_TARGET_PATH=$(pwd)/targets cargo fix --edition \ --target targets/x86_64-unknown-kernel.json \ --target targets/i686-unknown-kernel.json \ --target targets/aarch64-unknown-kernel.json \ --target targets/riscv64-unknown-kernel.json \ -Zbuild-std=core,alloc --allow-dirty --bin kernel cargo fmt
28 lines
772 B
Rust
28 lines
772 B
Rust
pub mod aligned_box;
|
|
#[macro_use]
|
|
pub mod int_like;
|
|
|
|
/// Debug macro, lifted from the std
|
|
#[macro_export]
|
|
macro_rules! dbg {
|
|
() => {
|
|
$crate::println!("[{}:{}]", file!(), line!());
|
|
};
|
|
($val:expr_2021) => {
|
|
// Use of `match` here is intentional because it affects the lifetimes
|
|
// of temporaries - https://stackoverflow.com/a/48732525/1063961
|
|
match $val {
|
|
tmp => {
|
|
$crate::println!("[{}:{}] {} = {:#?}",
|
|
file!(), line!(), stringify!($val), &tmp);
|
|
tmp
|
|
}
|
|
}
|
|
};
|
|
// Trailing comma with single argument is ignored
|
|
($val:expr_2021,) => { $crate::dbg!($val) };
|
|
($($val:expr_2021),+ $(,)?) => {
|
|
($($crate::dbg!($val)),+,)
|
|
};
|
|
}
|