Closed
Description
fn main() {
const XYZ: char = 0xEF8888 as char;
println!("{}", XYZ);
}
Will warn "literal is out of range for u8
" because u8
is the only as char
cast that is acceptable.
We should show a better warning and suggest the \u
syntax instead.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.Working group: Diagnostics