diff options
| author | bors <bors@rust-lang.org> | 2022-11-01 09:01:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-01 09:01:12 +0000 |
| commit | c493bae0d8efd75723460ce5c371f726efa93f15 (patch) | |
| tree | 2ea0e17fd499adaa1c6d2e150edfeb0bf35baad8 /src/test/codegen | |
| parent | dc05f60c1ff4e2cb2e6eb80c9b3afa612ce28c7f (diff) | |
| parent | 5d30bfc43124e9c907851a5f36ab4afd48b3578d (diff) | |
| download | rust-c493bae0d8efd75723460ce5c371f726efa93f15.tar.gz rust-c493bae0d8efd75723460ce5c371f726efa93f15.zip | |
Auto merge of #103832 - Dylan-DPC:rollup-maw3kmx, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #103061 (Rewrite implementation of `#[alloc_error_handler]`) - #103584 (Remove bounds check when array is indexed by enum) - #103706 (Fix E0433 No Typo Suggestions) - #103729 (interpret: fix align_of_val on packed types) - #103759 (Use `adt_def` during type collection.) - #103809 (Fix a typo in std::net mod doc comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/enum-bounds-check-derived-idx.rs | 6 | ||||
| -rw-r--r-- | src/test/codegen/enum-bounds-check-issue-13926.rs | 3 | ||||
| -rw-r--r-- | src/test/codegen/enum-bounds-check.rs | 3 |
3 files changed, 4 insertions, 8 deletions
diff --git a/src/test/codegen/enum-bounds-check-derived-idx.rs b/src/test/codegen/enum-bounds-check-derived-idx.rs index fe02aeb5f62..aa66c2ed08e 100644 --- a/src/test/codegen/enum-bounds-check-derived-idx.rs +++ b/src/test/codegen/enum-bounds-check-derived-idx.rs @@ -12,15 +12,13 @@ pub enum Bar { // CHECK-LABEL: @lookup_inc #[no_mangle] pub fn lookup_inc(buf: &[u8; 5], f: Bar) -> u8 { - // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332 - // CHECK: panic_bounds_check + // CHECK-NOT: panic_bounds_check buf[f as usize + 1] } // CHECK-LABEL: @lookup_dec #[no_mangle] pub fn lookup_dec(buf: &[u8; 5], f: Bar) -> u8 { - // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332 - // CHECK: panic_bounds_check + // CHECK-NOT: panic_bounds_check buf[f as usize - 1] } diff --git a/src/test/codegen/enum-bounds-check-issue-13926.rs b/src/test/codegen/enum-bounds-check-issue-13926.rs index 1aec41d5441..b26945bc549 100644 --- a/src/test/codegen/enum-bounds-check-issue-13926.rs +++ b/src/test/codegen/enum-bounds-check-issue-13926.rs @@ -13,7 +13,6 @@ pub enum Exception { // CHECK-LABEL: @access #[no_mangle] pub fn access(array: &[usize; 12], exc: Exception) -> usize { - // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332 - // CHECK: panic_bounds_check + // CHECK-NOT: panic_bounds_check array[(exc as u8 - 4) as usize] } diff --git a/src/test/codegen/enum-bounds-check.rs b/src/test/codegen/enum-bounds-check.rs index f85c6817ded..17322d5911b 100644 --- a/src/test/codegen/enum-bounds-check.rs +++ b/src/test/codegen/enum-bounds-check.rs @@ -21,7 +21,6 @@ pub enum Bar { // CHECK-LABEL: @lookup_unmodified #[no_mangle] pub fn lookup_unmodified(buf: &[u8; 5], f: Bar) -> u8 { - // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332 - // CHECK: panic_bounds_check + // CHECK-NOT: panic_bounds_check buf[f as usize] } |
