| Age | Commit message (Collapse) | Author | Lines |
|
This API removes the need for several `unsafe` blocks, and leads to
clearer code.
|
|
Also drop "Filesystem" from its name
|
|
|
|
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com>
|
|
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
|
|
|
|
|
|
Many, many projects use `size_of` to get the size of a type. However,
it's also often equally easy to hardcode a size (e.g. `8` instead of
`size_of::<u64>()`). Minimizing friction in the use of `size_of` helps
ensure that people use it and make code more self-documenting.
The name `size_of` is unambiguous: the name alone, without any prefix or
path, is self-explanatory and unmistakeable for any other functionality.
Adding it to the prelude cannot produce any name conflicts, as any local
definition will silently shadow the one from the prelude. Thus, we don't
need to wait for a new edition prelude to add it.
Add `size_of_val`, `align_of`, and `align_of_val` as well, with similar
justification: widely useful, self-explanatory, unmistakeable for
anything else, won't produce conflicts.
|
|
|
|
also introduce ptr::dangling matching NonNull::dangling
|
|
detects redundant imports that can be eliminated.
for #117772 :
In order to facilitate review and modification, split the checking code and
removing redundant imports code into two PR.
|
|
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Implement rust-lang/libs-team#173.
|
|
|
|
|
|
...replacing `.cast().wrapping_offset().cast()` & similar code.
|
|
that accepts `ErrorData<Box<Custom>>`
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
|
|
|
|
Some things like the unwinders and system APIs are not fully conformant,
this only covers a lot of low-hanging fruit.
|
|
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
|
|
|
|
|
|
This updates the standard library's documentation to use the new syntax. The
documentation is worthwhile to update as it should be more idiomatic
(particularly for features like this, which are nice for users to get acquainted
with). The general codebase is likely more hassle than benefit to update: it'll
hurt git blame, and generally updates can be done by folks updating the code if
(and when) that makes things more readable with the new format.
A few places in the compiler and library code are updated (mostly just due to
already having been done when this commit was first authored).
|
|
|
|
quite accurate anymore
|
|
|
|
|
|
|
|
Co-authored-by: the8472 <the8472@users.noreply.github.com>
|
|
Co-authored-by: Ralf Jung <post@ralfj.de>
|
|
|
|
|