rust/src/libcollectionstest
bors d1df3fecdf Auto merge of #34485 - tbu-:pr_unicode_debug_str, r=alexcrichton
Escape fewer Unicode codepoints in `Debug` impl of `str`

Use the same procedure as Python to determine whether a character is
printable, described in [PEP 3138]. In particular, this means that the
following character classes are escaped:

- Cc (Other, Control)
- Cf (Other, Format)
- Cs (Other, Surrogate), even though they can't appear in Rust strings
- Co (Other, Private Use)
- Cn (Other, Not Assigned)
- Zl (Separator, Line)
- Zp (Separator, Paragraph)
- Zs (Separator, Space), except for the ASCII space `' '` `0x20`

This allows for user-friendly inspection of strings that are not
English (e.g. compare `"\u{e9}\u{e8}\u{ea}"` to `"éèê"`).

Fixes #34318.
CC #34422.

[PEP 3138]: https://www.python.org/dev/peps/pep-3138/
2016-07-28 11:20:33 -07:00
..
btree Implement split_off for BTreeMap and BTreeSet (RFC 509) 2016-06-01 10:02:25 +03:00
bench.rs More test fixes 2015-04-14 10:14:19 -07:00
binary_heap.rs Readding lifetime parameters and removing allocation 2016-07-21 20:55:19 -07:00
enum_set.rs format with [rustfmt_skip] and addressed a few comments 2016-05-24 07:39:55 +05:30
fmt.rs std: Clean out #[deprecated] APIs 2015-03-31 15:49:57 -07:00
lib.rs std: Stabilize APIs for the 1.11.0 release 2016-07-03 10:49:01 -07:00
linked_list.rs run rustfmt on libcollections test module 2016-05-22 23:57:13 +05:30
slice.rs format with [rustfmt_skip] and addressed a few comments 2016-05-24 07:39:55 +05:30
str.rs Rename char::escape to char::escape_debug and add tracking issue 2016-07-28 02:20:49 +02:00
string.rs run rustfmt on libcollections test module 2016-05-22 23:57:13 +05:30
vec.rs Readding lifetime parameters and removing allocation 2016-07-21 20:55:19 -07:00
vec_deque.rs run rustfmt on libcollections test module 2016-05-22 23:57:13 +05:30