Skip to content

Commit 71512e4

Browse files
authored
Rollup merge of rust-lang#72682 - JohnTitor:mir-tests, r=RalfJung
Add test for rust-lang#66930 Closes rust-lang#66930 Closes rust-lang#67558 They're fixed by rust-lang#72424. I skipped adding `--emit=mir` flag to src/test/ui/issues/issue-25145.rs as a regression test since the root cause seems the same and it should be run with `check-pass`, not `run-pass` so we should duplicate that test. r? @RalfJung
2 parents feaceb2 + e069524 commit 71512e4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/ui/mir/issue-66930.rs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// check-pass
2+
// compile-flags: --emit=mir,link
3+
// Regression test for #66930, this ICE requires `--emit=mir` flag.
4+
5+
static UTF8_CHAR_WIDTH: [u8; 0] = [];
6+
7+
pub fn utf8_char_width(b: u8) -> usize {
8+
UTF8_CHAR_WIDTH[b as usize] as usize
9+
}
10+
11+
fn main() {}

0 commit comments

Comments
 (0)