Update std::simd usage and test outputs

This commit is contained in:
Caleb Zulawski 2023-11-19 19:04:06 -05:00
parent f0f795d1a8
commit 4d9607869a
53 changed files with 175 additions and 177 deletions

View File

@ -1765,7 +1765,7 @@ fn simd_contains(needle: &str, haystack: &str) -> Option<bool> {
};
// do a naive search if the haystack is too small to fit
if haystack.len() < Block::LANES + last_byte_offset {
if haystack.len() < Block::LEN + last_byte_offset {
return Some(haystack.windows(needle.len()).any(|c| c == needle));
}
@ -1812,7 +1812,7 @@ fn simd_contains(needle: &str, haystack: &str) -> Option<bool> {
let eq_first: Mask = a.simd_eq(first_probe);
let eq_last: Mask = b.simd_eq(second_probe);
let both = eq_first.bitand(eq_last);
let mask = both.to_bitmask();
let mask = both.to_bitmask() as u16;
return mask;
};
@ -1822,32 +1822,32 @@ fn simd_contains(needle: &str, haystack: &str) -> Option<bool> {
// The loop condition must ensure that there's enough headroom to read LANE bytes,
// and not only at the current index but also at the index shifted by block_offset
const UNROLL: usize = 4;
while i + last_byte_offset + UNROLL * Block::LANES < haystack.len() && !result {
while i + last_byte_offset + UNROLL * Block::LEN < haystack.len() && !result {
let mut masks = [0u16; UNROLL];
for j in 0..UNROLL {
masks[j] = test_chunk(i + j * Block::LANES);
masks[j] = test_chunk(i + j * Block::LEN);
}
for j in 0..UNROLL {
let mask = masks[j];
if mask != 0 {
result |= check_mask(i + j * Block::LANES, mask, result);
result |= check_mask(i + j * Block::LEN, mask, result);
}
}
i += UNROLL * Block::LANES;
i += UNROLL * Block::LEN;
}
while i + last_byte_offset + Block::LANES < haystack.len() && !result {
while i + last_byte_offset + Block::LEN < haystack.len() && !result {
let mask = test_chunk(i);
if mask != 0 {
result |= check_mask(i, mask, result);
}
i += Block::LANES;
i += Block::LEN;
}
// Process the tail that didn't fit into LANES-sized steps.
// This simply repeats the same procedure but as right-aligned chunk instead
// of a left-aligned one. The last byte must be exactly flush with the string end so
// we don't miss a single byte or read out of bounds.
let i = haystack.len() - last_byte_offset - Block::LANES;
let i = haystack.len() - last_byte_offset - Block::LEN;
let mask = test_chunk(i);
if mask != 0 {
result |= check_mask(i, mask, result);

View File

@ -1,5 +1,5 @@
#![feature(portable_simd)]
use std::simd::*;
use std::simd::prelude::*;
fn main() {
unsafe {

View File

@ -2,7 +2,7 @@
//@compile-flags: -Zmiri-permissive-provenance
#![feature(portable_simd, platform_intrinsics)]
use std::ptr;
use std::simd::*;
use std::simd::prelude::*;
fn main() {
// Pointer casts

View File

@ -1,7 +1,7 @@
//@compile-flags: -Zmiri-strict-provenance
#![feature(portable_simd, platform_intrinsics, adt_const_params, inline_const)]
#![allow(incomplete_features)]
use std::simd::*;
#![allow(incomplete_features, internal_features)]
use std::simd::{prelude::*, StdFloat};
extern "platform-intrinsic" {
pub(crate) fn simd_bitmask<T, U>(x: T) -> U;
@ -328,14 +328,12 @@ fn simd_cast() {
}
fn simd_swizzle() {
use Which::*;
let a = f32x4::splat(10.0);
let b = f32x4::from_array([1.0, 2.0, 3.0, -4.0]);
assert_eq!(simd_swizzle!(b, [3, 0, 0, 2]), f32x4::from_array([-4.0, 1.0, 1.0, 3.0]));
assert_eq!(simd_swizzle!(b, [1, 2]), f32x2::from_array([2.0, 3.0]));
assert_eq!(simd_swizzle!(b, a, [First(3), Second(0)]), f32x2::from_array([-4.0, 10.0]));
assert_eq!(simd_swizzle!(b, a, [3, 4]), f32x2::from_array([-4.0, 10.0]));
}
fn simd_gather_scatter() {
@ -417,13 +415,13 @@ fn simd_intrinsics() {
i32x4::from_array([10, 2, 10, 10])
);
assert_eq!(simd_shuffle_generic::<_, i32x4, { &[3, 1, 0, 2] }>(a, b), a,);
assert_eq!(simd_shuffle::<_, _, i32x4>(a, b, const { [3, 1, 0, 2] }), a,);
assert_eq!(simd_shuffle::<_, _, i32x4>(a, b, const { [3u32, 1, 0, 2] }), a,);
assert_eq!(
simd_shuffle_generic::<_, i32x4, { &[7, 5, 4, 6] }>(a, b),
i32x4::from_array([4, 2, 1, 10]),
);
assert_eq!(
simd_shuffle::<_, _, i32x4>(a, b, const { [7, 5, 4, 6] }),
simd_shuffle::<_, _, i32x4>(a, b, const { [7u32, 5, 4, 6] }),
i32x4::from_array([4, 2, 1, 10]),
);
}

View File

@ -10,7 +10,7 @@
#![crate_type = "lib"]
#![feature(portable_simd)]
use std::simd::{Simd, SimdUint};
use std::simd::prelude::*;
const N: usize = 16;
#[no_mangle]

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -28,16 +28,16 @@
scope 12 {
scope 13 (inlined NonNull::<T>::new_unchecked::runtime::<[bool; 0]>) {
debug ptr => _6;
scope 14 (inlined ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut [bool; 0]>::is_null) {
debug self => _6;
let mut _9: *mut u8;
scope 15 {
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _9;
scope 17 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 17 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _9;
scope 18 {
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _9;
}
}

View File

@ -30,7 +30,7 @@
StorageLive(_4);
StorageLive(_5);
_5 = _3;
_4 = ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind unreachable];
_4 = std::ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind unreachable];
}
bb1: {

View File

@ -30,7 +30,7 @@
StorageLive(_4);
StorageLive(_5);
_5 = _3;
_4 = ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind continue];
_4 = std::ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> [return: bb1, unwind continue];
}
bb1: {

View File

@ -69,7 +69,7 @@
bb3: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }};
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@ -78,7 +78,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb4, unwind unreachable];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb4, unwind unreachable];
}
bb4: {

View File

@ -67,7 +67,7 @@
bb4: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }};
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@ -76,7 +76,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb5, unwind continue];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): std::ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb5, unwind continue];
}
bb5: {

View File

@ -69,7 +69,7 @@
bb3: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }};
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@ -78,7 +78,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb4, unwind unreachable];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb4, unwind unreachable];
}
bb4: {

View File

@ -67,7 +67,7 @@
bb4: {
- _1 = move ((_2 as Some).0: std::alloc::Layout);
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }};
+ _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }};
StorageDead(_10);
StorageDead(_2);
StorageLive(_3);
@ -76,7 +76,7 @@
StorageLive(_6);
_9 = const _;
- _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb5, unwind continue];
+ _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): std::ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb5, unwind continue];
}
bb5: {

View File

@ -30,7 +30,7 @@ fn int_range(_1: usize, _2: usize) -> () {
scope 7 {
}
}
scope 8 (inlined cmp::impls::<impl PartialOrd for usize>::lt) {
scope 8 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
debug self => _6;
debug other => _7;
let mut _8: usize;

View File

@ -24,16 +24,16 @@ fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
debug src => _1;
scope 7 (inlined intrinsics::is_aligned_and_not_null::<u32>) {
debug ptr => _1;
scope 8 (inlined ptr::const_ptr::<impl *const u32>::is_null) {
scope 8 (inlined std::ptr::const_ptr::<impl *const u32>::is_null) {
debug self => _1;
let mut _3: *const u8;
scope 9 {
scope 10 (inlined ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
scope 10 (inlined std::ptr::const_ptr::<impl *const T>::is_null::runtime_impl) {
debug ptr => _3;
scope 11 (inlined ptr::const_ptr::<impl *const u8>::addr) {
scope 11 (inlined std::ptr::const_ptr::<impl *const u8>::addr) {
debug self => _3;
scope 12 {
scope 13 (inlined ptr::const_ptr::<impl *const u8>::cast::<()>) {
scope 13 (inlined std::ptr::const_ptr::<impl *const u8>::cast::<()>) {
debug self => _3;
}
}
@ -41,7 +41,7 @@ fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
}
}
}
scope 14 (inlined ptr::const_ptr::<impl *const u32>::is_aligned) {
scope 14 (inlined std::ptr::const_ptr::<impl *const u32>::is_aligned) {
debug self => _1;
scope 15 (inlined align_of::<u32>) {
}

View File

@ -33,7 +33,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
scope 7 {
}
}
scope 8 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
scope 8 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _7;
debug other => _8;
let mut _9: u32;

View File

@ -33,7 +33,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
scope 7 {
}
}
scope 8 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
scope 8 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _7;
debug other => _8;
let mut _9: u32;

View File

@ -17,7 +17,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
scope 4 {
}
}
scope 5 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
scope 5 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _2;
debug other => _3;
let mut _4: u32;

View File

@ -17,7 +17,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
scope 4 {
}
}
scope 5 (inlined cmp::impls::<impl PartialOrd for u32>::lt) {
scope 5 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
debug self => _2;
debug other => _3;
let mut _4: u32;

View File

@ -30,48 +30,48 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:8:25: 8:39}, _2
debug b => _6;
debug c => _8;
debug d => _10;
scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _11;
debug other => _13;
let mut _14: &usize;
let mut _15: &usize;
scope 3 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _14;
debug other => _15;
let mut _16: usize;
let mut _17: usize;
}
}
scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _19;
debug other => _21;
let mut _22: &usize;
let mut _23: &usize;
scope 5 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _22;
debug other => _23;
let mut _24: usize;
let mut _25: usize;
}
}
scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _27;
debug other => _29;
let mut _30: &usize;
let mut _31: &usize;
scope 7 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _30;
debug other => _31;
let mut _32: usize;
let mut _33: usize;
}
}
scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) {
scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
debug self => _35;
debug other => _37;
let mut _38: &usize;
let mut _39: &usize;
scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::le) {
scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
debug self => _38;
debug other => _39;
let mut _40: usize;

View File

@ -22,17 +22,17 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
let mut _6: *mut u32;
let mut _9: &[&str];
scope 5 {
scope 10 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
debug self => _5;
}
scope 11 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
debug self => _6;
debug count => _2;
scope 12 {
}
}
}
scope 6 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
debug self => _5;
let mut _10: *const [u32];
scope 7 (inlined std::ptr::metadata::<[u32]>) {

View File

@ -22,17 +22,17 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
let mut _6: *mut u32;
let mut _9: &[&str];
scope 5 {
scope 10 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
debug self => _5;
}
scope 11 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
debug self => _6;
debug count => _2;
scope 12 {
}
}
}
scope 6 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
debug self => _5;
let mut _10: *const [u32];
scope 7 (inlined std::ptr::metadata::<[u32]>) {

View File

@ -24,10 +24,10 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
let _6: usize;
scope 5 {
debug new_len => _6;
scope 10 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
debug self => _5;
}
scope 11 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
debug self => _7;
debug count => _3;
scope 12 {
@ -37,7 +37,7 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
debug data => _8;
debug len => _6;
let mut _9: *mut ();
scope 14 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
debug self => _8;
}
scope 15 (inlined std::ptr::from_raw_parts_mut::<[u32]>) {
@ -52,7 +52,7 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
}
}
}
scope 6 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
debug self => _5;
let mut _15: *const [u32];
scope 7 (inlined std::ptr::metadata::<[u32]>) {
@ -88,9 +88,9 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
StorageLive(_11);
StorageLive(_10);
_10 = _9 as *const () (PointerCoercion(MutToConstPointer));
_11 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
_11 = std::ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
StorageDead(_10);
_12 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
_12 = std::ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
StorageDead(_11);
_13 = (_12.1: *mut [u32]);
StorageDead(_12);

View File

@ -24,10 +24,10 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
let _6: usize;
scope 5 {
debug new_len => _6;
scope 10 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
scope 10 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) {
debug self => _5;
}
scope 11 (inlined ptr::mut_ptr::<impl *mut u32>::add) {
scope 11 (inlined std::ptr::mut_ptr::<impl *mut u32>::add) {
debug self => _7;
debug count => _3;
scope 12 {
@ -37,7 +37,7 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
debug data => _8;
debug len => _6;
let mut _9: *mut ();
scope 14 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
scope 14 (inlined std::ptr::mut_ptr::<impl *mut u32>::cast::<()>) {
debug self => _8;
}
scope 15 (inlined std::ptr::from_raw_parts_mut::<[u32]>) {
@ -52,7 +52,7 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
}
}
}
scope 6 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) {
scope 6 (inlined std::ptr::mut_ptr::<impl *mut [u32]>::len) {
debug self => _5;
let mut _15: *const [u32];
scope 7 (inlined std::ptr::metadata::<[u32]>) {
@ -88,9 +88,9 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
StorageLive(_11);
StorageLive(_10);
_10 = _9 as *const () (PointerCoercion(MutToConstPointer));
_11 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
_11 = std::ptr::metadata::PtrComponents::<[u32]> { data_address: move _10, metadata: _6 };
StorageDead(_10);
_12 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
_12 = std::ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _11 };
StorageDead(_11);
_13 = (_12.1: *mut [u32]);
StorageDead(_12);

View File

@ -45,16 +45,16 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@ -71,7 +71,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 10 {
}
}
scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {

View File

@ -45,16 +45,16 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@ -71,7 +71,7 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 10 {
}
}
scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {

View File

@ -42,16 +42,16 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _22: *mut u8;
scope 17 {
scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _22;
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _22;
scope 20 {
scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _22;
}
}
@ -68,7 +68,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {

View File

@ -42,16 +42,16 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _22: *mut u8;
scope 17 {
scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _22;
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _22;
scope 20 {
scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _22;
}
}
@ -68,7 +68,7 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {

View File

@ -39,7 +39,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 8 {
}
}
scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::lt) {
scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
debug self => _7;
debug other => _8;
let mut _9: usize;

View File

@ -39,7 +39,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
scope 8 {
}
}
scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::lt) {
scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
debug self => _7;
debug other => _8;
let mut _9: usize;

View File

@ -47,16 +47,16 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@ -73,7 +73,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {

View File

@ -47,16 +47,16 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 14 {
scope 15 (inlined NonNull::<T>::new_unchecked::runtime::<T>) {
debug ptr => _9;
scope 16 (inlined ptr::mut_ptr::<impl *mut T>::is_null) {
scope 16 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null) {
debug self => _9;
let mut _24: *mut u8;
scope 17 {
scope 18 (inlined ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
scope 18 (inlined std::ptr::mut_ptr::<impl *mut T>::is_null::runtime_impl) {
debug ptr => _24;
scope 19 (inlined ptr::mut_ptr::<impl *mut u8>::addr) {
scope 19 (inlined std::ptr::mut_ptr::<impl *mut u8>::addr) {
debug self => _24;
scope 20 {
scope 21 (inlined ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
scope 21 (inlined std::ptr::mut_ptr::<impl *mut u8>::cast::<()>) {
debug self => _24;
}
}
@ -73,7 +73,7 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
scope 10 {
}
}
scope 11 (inlined ptr::const_ptr::<impl *const T>::add) {
scope 11 (inlined std::ptr::const_ptr::<impl *const T>::add) {
debug self => _4;
debug count => _6;
scope 12 {

View File

@ -75,7 +75,7 @@ fn array_casts() -> () {
StorageLive(_6);
StorageLive(_7);
_7 = _2;
_6 = ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind unreachable];
_6 = std::ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind unreachable];
}
bb1: {
@ -101,7 +101,7 @@ fn array_casts() -> () {
StorageLive(_16);
StorageLive(_17);
_17 = _9;
_16 = ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind unreachable];
_16 = std::ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind unreachable];
}
bb2: {

View File

@ -75,7 +75,7 @@ fn array_casts() -> () {
StorageLive(_6);
StorageLive(_7);
_7 = _2;
_6 = ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind continue];
_6 = std::ptr::mut_ptr::<impl *mut usize>::add(move _7, const 1_usize) -> [return: bb1, unwind continue];
}
bb1: {
@ -101,7 +101,7 @@ fn array_casts() -> () {
StorageLive(_16);
StorageLive(_17);
_17 = _9;
_16 = ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind continue];
_16 = std::ptr::const_ptr::<impl *const usize>::add(move _17, const 1_usize) -> [return: bb2, unwind continue];
}
bb2: {

View File

@ -13,27 +13,27 @@ const EXPECTED = [
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_max',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+LANES%3E/method.simd_max'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_max'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_min',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+LANES%3E/method.simd_min'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_min'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_clamp',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+LANES%3E/method.simd_clamp'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci16,+N%3E/method.simd_clamp'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_add',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+LANES%3E/method.saturating_add'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_add'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_sub',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+LANES%3E/method.saturating_sub'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci16,+N%3E/method.saturating_sub'
},
],
},
@ -43,27 +43,27 @@ const EXPECTED = [
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_max',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+LANES%3E/method.simd_max'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_max'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_min',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+LANES%3E/method.simd_min'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_min'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'simd_clamp',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+LANES%3E/method.simd_clamp'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdOrd-for-Simd%3Ci8,+N%3E/method.simd_clamp'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_add',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+LANES%3E/method.saturating_add'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_add'
},
{
'path': 'std::simd::prelude::Simd',
'name': 'saturating_sub',
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+LANES%3E/method.saturating_sub'
'href': '../std/simd/prelude/struct.Simd.html#impl-SimdInt-for-Simd%3Ci8,+N%3E/method.saturating_sub'
},
],
},

View File

@ -1,4 +1,4 @@
error[E0283]: type annotations needed for `Mask<_, LANES>`
error[E0283]: type annotations needed for `Mask<_, N>`
--> $DIR/issue-91614.rs:6:9
|
LL | let y = Mask::<_, _>::splat(false);
@ -11,12 +11,12 @@ LL | let y = Mask::<_, _>::splat(false);
i16
i32
i64
note: required by a bound in `Mask::<T, LANES>::splat`
note: required by a bound in `Mask::<T, N>::splat`
--> $SRC_DIR/core/src/../../portable-simd/crates/core_simd/src/masks.rs:LL:COL
help: consider giving `y` an explicit type, where the type for type parameter `T` is specified
|
LL | let y: Mask<_, LANES> = Mask::<_, _>::splat(false);
| ++++++++++++++++
LL | let y: Mask<_, N> = Mask::<_, _>::splat(false);
| ++++++++++++
error: aborting due to 1 previous error

View File

@ -93,7 +93,7 @@ error[E0080]: could not evaluate static initializer
|
= note: out-of-bounds `offset_from`: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@ -108,7 +108,7 @@ error[E0080]: could not evaluate static initializer
|
= note: the evaluated program panicked at 'assertion failed: 0 < pointee_size && pointee_size <= isize::MAX as usize', $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
|
note: inside `ptr::const_ptr::<impl *const ()>::sub_ptr`
note: inside `std::ptr::const_ptr::<impl *const ()>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, ()>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@ -124,7 +124,7 @@ error[E0080]: could not evaluate static initializer
|
= note: out-of-bounds pointer arithmetic: ALLOC10 has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u32>::add`
note: inside `std::ptr::const_ptr::<impl *const u32>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `R2`
--> $DIR/forbidden_slices.rs:52:25
@ -183,7 +183,7 @@ error[E0080]: could not evaluate static initializer
|
= note: out-of-bounds pointer arithmetic: ALLOC11 has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u64>::add`
note: inside `std::ptr::const_ptr::<impl *const u64>::add`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `R8`
--> $DIR/forbidden_slices.rs:76:25
@ -196,7 +196,7 @@ error[E0080]: could not evaluate static initializer
|
= note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL
@ -211,7 +211,7 @@ error[E0080]: could not evaluate static initializer
|
= note: `ptr_offset_from_unsigned` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
note: inside `std::ptr::const_ptr::<impl *const u32>::sub_ptr`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `from_ptr_range::<'_, u32>`
--> $SRC_DIR/core/src/slice/raw.rs:LL:COL

View File

@ -18,7 +18,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const u32>::read`
note: inside `std::ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `_CONST_READ`
--> $DIR/out_of_bounds_read.rs:11:39
@ -33,7 +33,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `ptr::mut_ptr::<impl *mut u32>::read`
note: inside `std::ptr::mut_ptr::<impl *mut u32>::read`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
note: inside `_MUT_READ`
--> $DIR/out_of_bounds_read.rs:12:37

View File

@ -17,7 +17,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `copy_nonoverlapping::<u32>`
--> $SRC_DIR/core/src/intrinsics.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
note: inside `std::ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `MISALIGNED_COPY`
--> $DIR/raw-pointer-ub.rs:22:5

View File

@ -155,7 +155,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u32>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const u32>::read`
note: inside `std::ptr::const_ptr::<impl *const u32>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNALIGNED_READ`
--> $DIR/ub-ref-ptr.rs:66:5

View File

@ -5,7 +5,7 @@ error[E0080]: evaluation of constant value failed
|
note: inside `std::ptr::read::<u8>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `ptr::const_ptr::<impl *const u8>::read`
note: inside `std::ptr::const_ptr::<impl *const u8>::read`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `C`
--> $DIR/issue-miri-1910.rs:7:5

View File

@ -7,7 +7,7 @@ note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `mem::swap_simple::<MaybeUninit<MaybeUninit<u8>>>`
--> $SRC_DIR/core/src/mem/mod.rs:LL:COL
note: inside `ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
note: inside `std::ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
note: inside `swap_nonoverlapping::<MaybeUninit<u8>>`
--> $SRC_DIR/core/src/ptr/mod.rs:LL:COL

View File

@ -9,7 +9,7 @@ error[E0080]: evaluation of constant value failed
|
= note: `ptr_offset_from` called on pointers into different allocations
|
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `NOT_PTR`
--> $DIR/offset_from_ub.rs:24:14
@ -88,7 +88,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds `offset_from`: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OFFSET_VERY_FAR1`
--> $DIR/offset_from_ub.rs:115:14
@ -101,7 +101,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds `offset_from`: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset_from`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset_from`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OFFSET_VERY_FAR2`
--> $DIR/offset_from_ub.rs:121:14

View File

@ -3,7 +3,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `BEFORE_START`
--> $DIR/offset_ub.rs:7:46
@ -16,7 +16,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC0 has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `AFTER_END`
--> $DIR/offset_ub.rs:8:43
@ -29,7 +29,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC1 has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `AFTER_ARRAY`
--> $DIR/offset_ub.rs:9:45
@ -42,7 +42,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u16>::offset`
note: inside `std::ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OVERFLOW`
--> $DIR/offset_ub.rs:11:43
@ -55,7 +55,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u16>::offset`
note: inside `std::ptr::const_ptr::<impl *const u16>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNDERFLOW`
--> $DIR/offset_ub.rs:12:44
@ -68,7 +68,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `OVERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:13:56
@ -81,7 +81,7 @@ error[E0080]: evaluation of constant value failed
|
= note: overflowing in-bounds pointer arithmetic
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNDERFLOW_ADDRESS_SPACE`
--> $DIR/offset_ub.rs:14:57
@ -94,7 +94,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC2 has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `NEGATIVE_OFFSET`
--> $DIR/offset_ub.rs:15:49
@ -107,7 +107,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: ALLOC3 has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `ZERO_SIZED_ALLOC`
--> $DIR/offset_ub.rs:17:50
@ -120,7 +120,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: 0x1[noalloc] is a dangling pointer (it has no provenance)
|
note: inside `ptr::mut_ptr::<impl *mut u8>::offset`
note: inside `std::ptr::mut_ptr::<impl *mut u8>::offset`
--> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
note: inside `DANGLING`
--> $DIR/offset_ub.rs:18:42
@ -133,7 +133,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: null pointer is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `NULL_OFFSET_ZERO`
--> $DIR/offset_ub.rs:21:50
@ -146,7 +146,7 @@ error[E0080]: evaluation of constant value failed
|
= note: out-of-bounds pointer arithmetic: 0x7f..f[noalloc] is a dangling pointer (it has no provenance)
|
note: inside `ptr::const_ptr::<impl *const u8>::offset`
note: inside `std::ptr::const_ptr::<impl *const u8>::offset`
--> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
note: inside `UNDERFLOW_ABS`
--> $DIR/offset_ub.rs:24:47

View File

@ -2,7 +2,7 @@
#![no_std]
#![feature(portable_simd)]
use core::simd::f32x4;
use core::simd::SimdFloat;
use core::simd::num::SimdFloat;
// For SIMD float ops, the LLIR version which is used to implement the portable
// forms of them may become calls to math.h AKA libm. So, we can't guarantee

View File

@ -3,7 +3,7 @@
// This is the converse of the other libm test.
#![feature(portable_simd)]
use std::simd::f32x4;
use std::simd::{SimdFloat, StdFloat};
use std::simd::{num::SimdFloat, StdFloat};
// For SIMD float ops, the LLIR version which is used to implement the portable
// forms of them may become calls to math.h AKA libm. So, we can't guarantee

View File

@ -5,7 +5,7 @@ LL | let _: &[i8] = data.into();
| ^^^^ the trait `From<&[u8]>` is not implemented for `&[i8]`
|
= help: the following other types implement trait `From<T>`:
<[bool; LANES] as From<Mask<T, LANES>>>
<[bool; N] as From<Mask<T, N>>>
<[T; N] as From<Simd<T, N>>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>