diff options
| author | bors <bors@rust-lang.org> | 2021-03-13 02:08:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-13 02:08:33 +0000 |
| commit | 4d76b4ca52a65d63ab83d82d6630f1df8ec05a93 (patch) | |
| tree | 0d5e3411672f54161a369a80e9f31fc612d323c1 /src/test | |
| parent | 46a934a1dc789b9441e5fb5cd043287baddcc5c7 (diff) | |
| parent | 684fa1977c687520d0b5b8fad45488ec1cba6da0 (diff) | |
| download | rust-4d76b4ca52a65d63ab83d82d6630f1df8ec05a93.tar.gz rust-4d76b4ca52a65d63ab83d82d6630f1df8ec05a93.zip | |
Auto merge of #83067 - JohnTitor:rollup-0wo338i, r=JohnTitor
Rollup of 6 pull requests Successful merges: - #82984 (Simplify ast block lowering) - #83012 (Update Clippy) - #83020 (Emit the enum range assumption if the range only contains one element) - #83037 (Support merge_functions option in NewPM since LLVM >= 12) - #83052 (updated vulnerable deps) - #83059 (Allow configuring `rustdoc --disable-minification` in config.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/codegen/enum-bounds-check-issue-82871.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/codegen/enum-bounds-check-issue-82871.rs b/src/test/codegen/enum-bounds-check-issue-82871.rs new file mode 100644 index 00000000000..e779e2ef274 --- /dev/null +++ b/src/test/codegen/enum-bounds-check-issue-82871.rs @@ -0,0 +1,16 @@ +// compile-flags: -O +// min-llvm-version: 11.0 + +#![crate_type = "lib"] + +#[repr(C)] +pub enum E { + A, +} + +// CHECK-LABEL: @index +#[no_mangle] +pub fn index(x: &[u32; 3], ind: E) -> u32{ + // CHECK-NOT: panic_bounds_check + x[ind as usize] +} |
