rust/tests/ui/mir/issue-66930.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
254 B
Rust
Raw Normal View History

2020-05-28 02:43:03 -05:00
// 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() {}