diff options
| author | bors <bors@rust-lang.org> | 2024-02-17 18:20:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-17 18:20:41 +0000 |
| commit | cabdf3ad257693aa79ffcc4b7dd1fdab41dc209e (patch) | |
| tree | 0b9165c5f70c60fd421dcf652a9998e5e132034f /tests/codegen | |
| parent | 12b5498f3bcaa9f7b7641ed829873da0907b21dc (diff) | |
| parent | eafa74ab629df7d02dc73fde7db4027f90b2538a (diff) | |
| download | rust-cabdf3ad257693aa79ffcc4b7dd1fdab41dc209e.tar.gz rust-cabdf3ad257693aa79ffcc4b7dd1fdab41dc209e.zip | |
Auto merge of #121240 - matthiaskrgr:rollup-lfb5i9w, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #120952 (Don't use mem::zeroed in vec::IntoIter) - #121085 (errors: only eagerly translate subdiagnostics) - #121091 (use build.rustc config and skip-stage0-validation flag) - #121149 (Fix typo in VecDeque::handle_capacity_increase() doc comment.) - #121193 (Use fulfillment in next trait solver coherence) - #121209 (Make `CodegenBackend::join_codegen` infallible.) - #121210 (Fix `cfg(target_abi = "sim")` on `i386-apple-ios`) - #121228 (create stamp file for clippy) - #121231 (remove a couple of redundant clones) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/vec-iter.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/codegen/vec-iter.rs b/tests/codegen/vec-iter.rs index 0282791e9d1..4e206858751 100644 --- a/tests/codegen/vec-iter.rs +++ b/tests/codegen/vec-iter.rs @@ -32,9 +32,9 @@ pub fn vec_iter_is_empty_nonnull(it: &vec::IntoIter<u8>) -> bool { it.is_empty() } -// CHECK-LABEL: @vec_iter_next +// CHECK-LABEL: @vec_iter_next_nonnull #[no_mangle] -pub fn vec_iter_next(it: &mut vec::IntoIter<u8>) -> Option<u8> { +pub fn vec_iter_next_nonnull(it: &mut vec::IntoIter<u8>) -> Option<u8> { // CHECK: load ptr // CHECK-SAME: !nonnull // CHECK-SAME: !noundef @@ -44,3 +44,16 @@ pub fn vec_iter_next(it: &mut vec::IntoIter<u8>) -> Option<u8> { // 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() +} |
