diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-21 14:34:12 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-22 14:28:48 +0200 |
| commit | a27f3e3fd1e4d16160f8885b6b06665b5319f56c (patch) | |
| tree | b033935392cbadf6f85d2dbddf433a88e323aeeb /tests/codegen/vec-iter.rs | |
| parent | ed93c1783b404d728d4809973a0550eb33cd293f (diff) | |
| download | rust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.tar.gz rust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.zip | |
Rename `tests/codegen` into `tests/codegen-llvm`
Diffstat (limited to 'tests/codegen/vec-iter.rs')
| -rw-r--r-- | tests/codegen/vec-iter.rs | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/tests/codegen/vec-iter.rs b/tests/codegen/vec-iter.rs deleted file mode 100644 index 4ed00d2d34f..00000000000 --- a/tests/codegen/vec-iter.rs +++ /dev/null @@ -1,58 +0,0 @@ -//@ compile-flags: -Copt-level=3 -#![crate_type = "lib"] -#![feature(exact_size_is_empty)] - -use std::vec; - -// CHECK-LABEL: @vec_iter_len_nonnull -#[no_mangle] -pub fn vec_iter_len_nonnull(it: &vec::IntoIter<u8>) -> usize { - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: sub nuw - // CHECK: ret - it.len() -} - -// CHECK-LABEL: @vec_iter_is_empty_nonnull -#[no_mangle] -pub fn vec_iter_is_empty_nonnull(it: &vec::IntoIter<u8>) -> bool { - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: ret - it.is_empty() -} - -// CHECK-LABEL: @vec_iter_next_nonnull -#[no_mangle] -pub fn vec_iter_next_nonnull(it: &mut vec::IntoIter<u8>) -> Option<u8> { - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: ret - it.next() -} - -// CHECK-LABEL: @vec_iter_next_back_nonnull -#[no_mangle] -pub fn vec_iter_next_back_nonnull(it: &mut vec::IntoIter<u8>) -> Option<u8> { - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: load ptr - // CHECK-SAME: !nonnull - // CHECK-SAME: !noundef - // CHECK: ret - it.next_back() -} |
