Rollup merge of #72682 - JohnTitor:mir-tests, r=RalfJung

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
This commit is contained in:
Dylan DPC 2020-05-29 02:33:24 +02:00 committed by GitHub
commit 71512e425f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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() {}