rust/library/core/src
Oli Scherer c1a80211f5
Rollup merge of #121024 - joseluis:feat-asciichar-default, r=scottmcm
implement `Default` for `AsciiChar`

This implements `Default` for `AsciiChar` in order to match `char`'s implementation.

From all the different possible ways to do this I think the clearest one is to have both `char` and `AsciiChar` impls together.

I've also updated the doc-comment of the default variant since rustdoc doesn't seem to indicate it otherwise. Probably the text could be improved, though. I couldn't find any similar examples in the codebase and suggestions are welcomed.

r? `@scottmcm`
2024-02-14 11:53:40 +01:00
..
alloc Add information about allocation lifetime to Allocator::allocate 2024-02-13 14:12:51 +00:00
array Bump version placeholders 2024-02-08 07:43:38 -05:00
ascii implement Default for AsciiChar 2024-02-13 12:04:44 +01:00
async_iter Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
cell Add some optimizations 2023-10-13 14:54:33 +02:00
char Rewrite assert_unsafe_precondition around the new intrinsic 2024-02-08 11:52:14 -05:00
cmp
convert Add #[track_caller] to the "From implies Into" impl 2024-01-10 10:30:54 +01:00
ffi Rollup merge of #119449 - Nilstrieb:library-clippy, r=cuviper 2024-02-11 08:25:42 +01:00
fmt Remove dead codes in core 2023-12-12 07:03:37 +00:00
future Replace some usage of #[rustc_on_unimplemented] with 2024-01-05 15:23:09 +01:00
hash Add insta-stable std:#️⃣:{DefaultHasher, RandomState} exports 2023-11-02 20:35:20 -04:00
intrinsics various docs tweaks 2024-02-10 10:19:57 +01:00
io Move BorrowedBuf and BorrowedCursor from std:io to core::io 2023-11-09 07:10:11 +09:00
iter iterator.rs: remove "Basic usage" text 2024-02-12 22:22:14 +02:00
macros Add #[coverage(off)] to closures introduced by #[test]/#[bench] 2024-01-21 23:17:00 +11:00
mem Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
net Bump version placeholders 2024-02-08 07:43:38 -05:00
num Rollup merge of #119449 - Nilstrieb:library-clippy, r=cuviper 2024-02-11 08:25:42 +01:00
ops Auto merge of #120712 - compiler-errors:async-closures-harmonize, r=oli-obk 2024-02-10 07:15:15 +00:00
panic Replace some usage of #[rustc_on_unimplemented] with 2024-01-05 15:23:09 +01:00
prelude
ptr Rollup merge of #120888 - saethlin:unsafe-precondition-cleanup, r=RalfJung 2024-02-11 23:19:10 +01:00
slice Auto merge of #120676 - Mark-Simulacrum:bootstrap-bump, r=clubby789 2024-02-09 18:09:02 +00:00
str Change wording 2024-02-09 22:24:57 -05:00
sync Rollup merge of #119449 - Nilstrieb:library-clippy, r=cuviper 2024-02-11 08:25:42 +01:00
task Rollup merge of #116387 - kpreid:wake-doc, r=cuviper 2024-02-14 11:53:37 +01:00
unicode
any.rs update version placeholders 2023-12-22 11:01:42 +01:00
arch.rs use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
ascii.rs
asserting.rs
bool.rs
borrow.rs
cell.rs Cleanup around the new assert_unsafe_precondition 2024-02-11 12:35:44 -05:00
clone.rs remove redundant imports 2023-12-10 10:56:22 +08:00
cmp.rs Rollup merge of #115386 - RalfJung:partial-eq-chain, r=dtolnay 2024-02-05 11:07:25 +01:00
default.rs implement Default for AsciiChar 2024-02-13 12:04:44 +01:00
error.md
error.rs Spelling fix 2024-01-20 18:27:55 +00:00
escape.rs Re-format code with new rustfmt 2023-11-15 21:45:48 -05:00
hint.rs Rewrite assert_unsafe_precondition around the new intrinsic 2024-02-08 11:52:14 -05:00
internal_macros.rs add track_caller for arith ops 2023-11-24 00:54:06 +08:00
intrinsics.rs Cleanup around the new assert_unsafe_precondition 2024-02-11 12:35:44 -05:00
lib.rs Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
marker.rs Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
option.rs Rollup merge of #119449 - Nilstrieb:library-clippy, r=cuviper 2024-02-11 08:25:42 +01:00
panic.rs merge core_panic feature into panic_internals 2023-12-09 14:49:00 +01:00
panicking.rs merge core_panic feature into panic_internals 2023-12-09 14:49:00 +01:00
pin.rs Rename pointer field on Pin 2024-01-16 14:58:42 -05:00
primitive_docs.rs Rollup merge of #120880 - RalfJung:vtable-fnptr-partialeq, r=cuviper 2024-02-11 23:19:09 +01:00
primitive.rs
result.rs Improve Option::inspect docs 2024-02-09 09:53:30 -06:00
time.rs Rollup merge of #120307 - djc:duration-constructors, r=Mark-Simulacrum 2024-02-11 08:25:42 +01:00
tuple.rs Rollup merge of #118307 - scottmcm:tuple-eq-simpler, r=joshtriplett 2024-02-11 08:25:41 +01:00
unit.rs