Closed
Description
I was going through the docs for std::char and found out that the heart is at first encoded with two codepoints (❤️) and just one afterwards (❤). This is misleading, as the difference is not visible in the browser (at least not in Chrome) and the reader first sees information that:
Trying to create a literal with let heart = '❤️'; gives an error
and afterwards there are perfectly valid examples like
for c in '❤'.escape_unicode() {
print!("{}", c);
}
What makes matters worse is that they both start with the same code point; the second example I listed states that:
This prints:
\u{2764}
While in the first case there is:
assert_eq!(Some('\u{2764}'), iter.next());
assert_eq!(Some('\u{fe0f}'), iter.next());
I found this misleading and had to use a hex editor to discover the difference.