about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-10-07 12:26:50 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-11-05 09:34:14 +0100
commit00e9ad1df82efc61b91a1a546629e8d1e529203d (patch)
tree49b4139971cd7459d5a06f8e65c1d8db1664452f /src/libstd/sys/unix/stack_overflow.rs
parentfffe0757086b8f381226cb5ddcb6c129a815b96d (diff)
downloadrust-00e9ad1df82efc61b91a1a546629e8d1e529203d.tar.gz
rust-00e9ad1df82efc61b91a1a546629e8d1e529203d.zip
Improve error message for char literals
If you try to put something that's bigger than a char into a char
literal, you get an error:

    fn main() {
        let c = 'ஶ்ரீ';
    }

    error: unterminated character constant:

This is a very compiler-centric message. Yes, it's technically
'unterminated', but that's not what you, the user did wrong.

Instead, this commit changes it to

    error: character literal may only contain one codepoint

As this actually tells you what went wrong.

Fixes #28851
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions