Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dramatically expand the docs of std::raw.
This overhauls the very meager docs that currently exist to clarify various understandable confusions that I've noticed, e.g. people look in `std::raw` for the "real" types of slices like `&[T]`, or think that `Slice<T>` refers to `[T]` (fixes #22214). This patch takes the liberty of offering some "style" guidance around `raw::Slice`, since there's more restricted ways to duplicate all functionality connected to it: `std::slice::from_raw_parts{,_mut}` for construction and `.as_{,mut_}ptr` & `.len` for deconstruction. It also deprecates the `std::raw::Closure` type which is now useless for non-type-erased closures, and replaced by `TraitObject` for `&Fn`, `&mut FnMut` etc, so I guess it should be called a: [breaking-change]
- Loading branch information
Showing
1 changed file
with
108 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters