-
- Downloads
rust: adapt `alloc` crate to the kernel
This customizes the subset of the Rust standard library `alloc` that was just imported as-is, mainly by: - Adding SPDX license identifiers. - Skipping modules (e.g. `rc` and `sync`) via new `cfg`s. - Adding fallible (`try_*`) versions of existing infallible methods (i.e. returning a `Result` instead of panicking). Since the standard library requires stable/unstable attributes, these additions are annotated with: #[stable(feature = "kernel", since = "1.0.0")] Using "kernel" as the feature allows to have the additions clearly marked. The "1.0.0" version is just a placeholder. (At the moment, only one is needed, but in the future more fallible methods will be added). Reviewed-by:Greg Kroah-Hartman <gregkh@linuxfoundation.org> Co-developed-by:
Alex Gaynor <alex.gaynor@gmail.com> Signed-off-by:
Alex Gaynor <alex.gaynor@gmail.com> Co-developed-by:
Wedson Almeida Filho <wedsonaf@google.com> Signed-off-by:
Wedson Almeida Filho <wedsonaf@google.com> Co-developed-by:
Gary Guo <gary@garyguo.net> Signed-off-by:
Gary Guo <gary@garyguo.net> Co-developed-by:
Matthew Bakhtiari <dev@mtbk.me> Signed-off-by:
Matthew Bakhtiari <dev@mtbk.me> Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
Showing
- rust/alloc/README.md 33 additions, 0 deletionsrust/alloc/README.md
- rust/alloc/alloc.rs 2 additions, 0 deletionsrust/alloc/alloc.rs
- rust/alloc/borrow.rs 3 additions, 1 deletionrust/alloc/borrow.rs
- rust/alloc/boxed.rs 4 additions, 0 deletionsrust/alloc/boxed.rs
- rust/alloc/collections/mod.rs 2 additions, 0 deletionsrust/alloc/collections/mod.rs
- rust/alloc/lib.rs 8 additions, 0 deletionsrust/alloc/lib.rs
- rust/alloc/raw_vec.rs 9 additions, 0 deletionsrust/alloc/raw_vec.rs
- rust/alloc/slice.rs 2 additions, 0 deletionsrust/alloc/slice.rs
- rust/alloc/vec/drain.rs 2 additions, 0 deletionsrust/alloc/vec/drain.rs
- rust/alloc/vec/drain_filter.rs 2 additions, 0 deletionsrust/alloc/vec/drain_filter.rs
- rust/alloc/vec/into_iter.rs 4 additions, 0 deletionsrust/alloc/vec/into_iter.rs
- rust/alloc/vec/is_zero.rs 2 additions, 0 deletionsrust/alloc/vec/is_zero.rs
- rust/alloc/vec/mod.rs 25 additions, 0 deletionsrust/alloc/vec/mod.rs
- rust/alloc/vec/partial_eq.rs 2 additions, 0 deletionsrust/alloc/vec/partial_eq.rs
rust/alloc/README.md
0 → 100644
Please register or sign in to comment