Skip to content

Commit

Permalink
Rollup merge of #72682 - JohnTitor:mir-tests, r=RalfJung
Browse files Browse the repository at this point in the history
Add test for #66930

Closes #66930
Closes #67558

They're fixed by #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
  • Loading branch information
Dylan-DPC authored May 29, 2020
2 parents feaceb2 + e069524 commit 71512e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/mir/issue-66930.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 71512e4

Please sign in to comment.