summaryrefslogtreecommitdiffstats
path: root/tests/ui/lexer/lex-bad-char-literals-7.rs
blob: c675df2f3ccd095fc2630b051b3e5d12faf849aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    let _: char = '';
    //~^ ERROR: empty character literal
    let _: char = '\u{}';
    //~^ ERROR: empty unicode escape

    // Next two are OK, but may befool error recovery
    let _ = '/';
    let _ = b'/';

    let _ = ' hello // here's a comment
    //~^ ERROR: unterminated character literal
}