Closed
Description
To write a double-quote (") in a string literal, once needs to escape with with a backslash like so:
let s = "double-quote: \"";
This is because it is also the delimiter of a string.
However, in character literals a single-quote (') is the delimiter and still, '"' works without warnings:
assert_eq!('\"', '"'); // always true
I think this might be a bug since it is not really needed to have an escaped double-quote in character literals or was it implemented as a helpful routine?
The same is true for strings and a single-quote!
assert_eq!("\'", "'"); // always true
I am very sorry if this was explicitly wanted behaviour!