summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mir/issue-66930.rs
blob: 5f9eb2bf437fdf2efaae5ca3826127c28b7fd649 (plain)
1
2
3
4
5
6
7
8
9
10
11
// check-pass
// compile-flags: --emit=mir,link
// Regression test for #66930, this ICE requires `--emit=mir` flag.

static UTF8_CHAR_WIDTH: [u8; 0] = [];

pub fn utf8_char_width(b: u8) -> usize {
    UTF8_CHAR_WIDTH[b as usize] as usize
}

fn main() {}