rust/src/libcore
bors b2799a56a1 Auto merge of #35755 - SimonSapin:char_convert, r=alexcrichton
Implement std::convert traits for char

This is motivated by avoiding the `as` operator, which sometimes silently truncates, and instead use conversions that are explicitly lossless and infallible.

I’m less certain that `From<u8> for char` should be implemented: while it matches an existing behavior of `as`, it’s not necessarily the right thing to use for non-ASCII bytes. It effectively decodes bytes as ISO/IEC 8859-1 (since Unicode designed its first 256 code points to be compatible with that encoding), but that is not apparent in the API name.
2016-09-01 02:53:28 -07:00
..
fmt Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
hash Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
iter accumulate vector and assert for RangeFrom and RangeInclusive examples 2016-08-26 11:54:32 -04:00
num Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
prelude Add missing annotations and some tests 2015-11-18 01:24:21 +03:00
str Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
sync Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
any.rs Replace unnecessary uses of TraitObject with casts 2016-08-26 06:37:36 -04:00
array.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
borrow.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
Cargo.toml No build.rs for libcore 2016-06-04 15:10:26 -07:00
cell.rs Rollup merge of #35895 - F001:patch-1, r=steveklabnik 2016-08-30 10:39:06 +02:00
char.rs Implement TryFrom<u32> for char 2016-08-29 17:34:02 +02:00
char_private.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
clone.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
cmp.rs Fix typo in PartialOrd docs 2016-08-31 13:50:58 +02:00
convert.rs Add missing urls into convert module 2016-08-31 16:15:19 +02:00
default.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
intrinsics.rs Auto merge of #35906 - jseyfried:local_prelude, r=eddyb 2016-08-25 20:45:32 -07:00
iter_private.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
lib.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
macros.rs Be more explicit about duck typing 2016-08-04 04:33:50 +03:00
marker.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
mem.rs Auto merge of #35906 - jseyfried:local_prelude, r=eddyb 2016-08-25 20:45:32 -07:00
nonzero.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
ops.rs Rollup merge of #35927 - matthew-piziak:bitandassign-example, r=GuillaumeGomez 2016-08-31 13:53:33 -07:00
option.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
panicking.rs Mark all extern functions as nounwind 2015-09-14 11:36:09 +02:00
ptr.rs Auto merge of #35906 - jseyfried:local_prelude, r=eddyb 2016-08-25 20:45:32 -07:00
raw.rs Clean up std::raw docs 2016-08-05 17:52:37 -04:00
result.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
slice.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
tuple.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00