]>
git.proxmox.com Git - rustc.git/blob - tests/codegen/integer-overflow.rs
2 // compile-flags: -O -C overflow-checks=on
12 // CHECK-LABEL: @slice_no_index_order
14 pub fn slice_no_index_order
<'a
>(s
: &'a
mut S1
, n
: usize) -> &'a
[u8] {
15 // CHECK-NOT: slice_index_order_fail
16 let d
= &s
.data
[s
.position
..s
.position
+n
];
21 // CHECK-LABEL: @test_check
23 pub fn test_check
<'a
>(s
: &'a
mut S1
, x
: usize, y
: usize) -> &'a
[u8] {
24 // CHECK: slice_index_order_fail