Add test for #66930

This commit is contained in:
Yuki Okushi 2020-05-28 16:43:03 +09:00
parent 4512721156
commit e069524c48
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1

View File

@ -0,0 +1,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() {}