linux/rust/kernel
Wedson Almeida Filho 25d176a4fa rust: prelude: add error::code::* constant items
It is convenient to have all the `Error` constant items (such as
`EINVAL`) available as-is everywhere (i.e. for code using the kernel
prelude such as kernel modules).

Therefore, add all of them to the prelude.

For instance, this allows to write `Err(EINVAL)` to create
a kernel `Result`:

    fn f() -> Result<...> {
        ...
        Err(EINVAL)
    }

Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
[Reworded, adapted for upstream and applied latest changes]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-12-04 01:59:15 +01:00
..
allocator.rs
error.rs rust: error: add From implementations for Error 2022-12-04 01:59:15 +01:00
lib.rs rust: error: add From implementations for Error 2022-12-04 01:59:15 +01:00
prelude.rs rust: prelude: add error::code::* constant items 2022-12-04 01:59:15 +01:00
print.rs rust: print: add pr_cont! macro 2022-12-01 20:12:44 +01:00
str.rs