Skip to content

Commit 1f234b5

Browse files
committed
Auto merge of rust-lang#140079 - ChrisDenton:rollup-2h5cg94, r=ChrisDenton
Rollup of 5 pull requests Successful merges: - rust-lang#137953 (simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors) - rust-lang#139990 (transmutability: remove NFA intermediate representation) - rust-lang#140044 (rustc-dev-guide subtree update) - rust-lang#140051 (Switch exploit mitigations to mdbook footnotes) - rust-lang#140054 (docs: fix typo change from inconstants to invariants) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2ab28f3 + 8427db1 commit 1f234b5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

core/src/intrinsics/simd.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pub unsafe fn simd_shuffle<T, U, V>(x: T, y: T, idx: U) -> V;
304304
///
305305
/// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
306306
///
307-
/// `V` must be a vector of signed integers with the same length as `T` (but any element size).
307+
/// `V` must be a vector of integers with the same length as `T` (but any element size).
308308
///
309309
/// For each pointer in `ptr`, if the corresponding value in `mask` is `!0`, read the pointer.
310310
/// Otherwise if the corresponding value in `mask` is `0`, return the corresponding value from
@@ -325,7 +325,7 @@ pub unsafe fn simd_gather<T, U, V>(val: T, ptr: U, mask: V) -> T;
325325
///
326326
/// `U` must be a vector of pointers to the element type of `T`, with the same length as `T`.
327327
///
328-
/// `V` must be a vector of signed integers with the same length as `T` (but any element size).
328+
/// `V` must be a vector of integers with the same length as `T` (but any element size).
329329
///
330330
/// For each pointer in `ptr`, if the corresponding value in `mask` is `!0`, write the
331331
/// corresponding value in `val` to the pointer.
@@ -349,7 +349,7 @@ pub unsafe fn simd_scatter<T, U, V>(val: T, ptr: U, mask: V);
349349
///
350350
/// `U` must be a pointer to the element type of `T`
351351
///
352-
/// `V` must be a vector of signed integers with the same length as `T` (but any element size).
352+
/// `V` must be a vector of integers with the same length as `T` (but any element size).
353353
///
354354
/// For each element, if the corresponding value in `mask` is `!0`, read the corresponding
355355
/// pointer offset from `ptr`.
@@ -372,7 +372,7 @@ pub unsafe fn simd_masked_load<V, U, T>(mask: V, ptr: U, val: T) -> T;
372372
///
373373
/// `U` must be a pointer to the element type of `T`
374374
///
375-
/// `V` must be a vector of signed integers with the same length as `T` (but any element size).
375+
/// `V` must be a vector of integers with the same length as `T` (but any element size).
376376
///
377377
/// For each element, if the corresponding value in `mask` is `!0`, write the corresponding
378378
/// value in `val` to the pointer offset from `ptr`.
@@ -556,7 +556,7 @@ pub unsafe fn simd_bitmask<T, U>(x: T) -> U;
556556
///
557557
/// `T` must be a vector.
558558
///
559-
/// `M` must be a signed integer vector with the same length as `T` (but any element size).
559+
/// `M` must be an integer vector with the same length as `T` (but any element size).
560560
///
561561
/// For each element, if the corresponding value in `mask` is `!0`, select the element from
562562
/// `if_true`. If the corresponding value in `mask` is `0`, select the element from

core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2814,7 +2814,7 @@ impl<T> [T] {
28142814
let half = size / 2;
28152815
let mid = base + half;
28162816

2817-
// SAFETY: the call is made safe by the following inconstants:
2817+
// SAFETY: the call is made safe by the following invariants:
28182818
// - `mid >= 0`: by definition
28192819
// - `mid < size`: `mid = size / 2 + size / 4 + size / 8 ...`
28202820
let cmp = f(unsafe { self.get_unchecked(mid) });

0 commit comments

Comments
 (0)