Skip to content
Commit 21e08aa5 authored by Guangbo Cui's avatar Guangbo Cui Committed by Miguel Ojeda
Browse files

rust: alloc: implement Display for Box



Currently `impl Display` is missing for `Box<T, A>`, as a result,
things like using `Box<..>` directly as an operand in `pr_info!()`
are impossible, which is less ergonomic compared to `Box` in Rust
std.

Therefore add `impl Display` for `Box`.

Acked-by: default avatarDanilo Krummrich <dakr@kernel.org>
Suggested-by: default avatarBoqun Feng <boqun.feng@gmail.com>
Link: https://github.com/Rust-for-Linux/linux/issues/1126


Signed-off-by: default avatarGuangbo Cui <2407018371@qq.com>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/tencent_2AD25C6A6898D3A598CBA54BB6AF59BB900A@qq.com


[ Reworded title. - Miguel ]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 2dde1c8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment