Rollup merge of #69339 - wesleywiser:test_for_69312, r=Centril

Add test for #69312

This bug was fixed by #67501.

Closes #69312
This commit is contained in:
Dylan DPC 2020-02-22 18:43:01 +05:30 committed by GitHub
commit 3d9b68a5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
// build-pass
// Verify that the compiler doesn't ICE during const prop while evaluating the index operation.
#![allow(unconditional_panic)]
fn main() {
let cols = [0u32; 0];
cols[0];
}