From e069524c4848e6d4b24866d6725509fdf67f371d Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 28 May 2020 16:43:03 +0900 Subject: [PATCH] Add test for #66930 --- src/test/ui/mir/issue-66930.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/test/ui/mir/issue-66930.rs diff --git a/src/test/ui/mir/issue-66930.rs b/src/test/ui/mir/issue-66930.rs new file mode 100644 index 0000000000000..5f9eb2bf437fd --- /dev/null +++ b/src/test/ui/mir/issue-66930.rs @@ -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() {}