Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 20bfac6

Browse filesBrowse files
authored
Rollup merge of rust-lang#127422 - greaka:master, r=workingjubilee
as_simd: fix doc comment to be in line with align_to In rust-lang#121201, the guarantees about `align_offset` and `align_to` were changed. This PR aims to correct the doc comment of `as_simd` to be in line with the new `align_to`. Tagging rust-lang#86656 for good measure.
2 parents f937ef1 + 0907955 commit 20bfac6
Copy full SHA for 20bfac6

File tree

Expand file treeCollapse file tree

1 file changed

+4
-22
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-22
lines changed

‎core/src/slice/mod.rs

Copy file name to clipboardExpand all lines: core/src/slice/mod.rs
+4-22Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3959,17 +3959,8 @@ impl<T> [T] {
39593959

39603960
/// Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.
39613961
///
3962-
/// This is a safe wrapper around [`slice::align_to`], so has the same weak
3963-
/// postconditions as that method. You're only assured that
3964-
/// `self.len() == prefix.len() + middle.len() * LANES + suffix.len()`.
3965-
///
3966-
/// Notably, all of the following are possible:
3967-
/// - `prefix.len() >= LANES`.
3968-
/// - `middle.is_empty()` despite `self.len() >= 3 * LANES`.
3969-
/// - `suffix.len() >= LANES`.
3970-
///
3971-
/// That said, this is a safe method, so if you're only writing safe code,
3972-
/// then this can at most cause incorrect logic, not unsoundness.
3962+
/// This is a safe wrapper around [`slice::align_to`], so inherits the same
3963+
/// guarantees as that method.
39733964
///
39743965
/// # Panics
39753966
///
@@ -4033,17 +4024,8 @@ impl<T> [T] {
40334024
/// Split a mutable slice into a mutable prefix, a middle of aligned SIMD types,
40344025
/// and a mutable suffix.
40354026
///
4036-
/// This is a safe wrapper around [`slice::align_to_mut`], so has the same weak
4037-
/// postconditions as that method. You're only assured that
4038-
/// `self.len() == prefix.len() + middle.len() * LANES + suffix.len()`.
4039-
///
4040-
/// Notably, all of the following are possible:
4041-
/// - `prefix.len() >= LANES`.
4042-
/// - `middle.is_empty()` despite `self.len() >= 3 * LANES`.
4043-
/// - `suffix.len() >= LANES`.
4044-
///
4045-
/// That said, this is a safe method, so if you're only writing safe code,
4046-
/// then this can at most cause incorrect logic, not unsoundness.
4027+
/// This is a safe wrapper around [`slice::align_to_mut`], so inherits the same
4028+
/// guarantees as that method.
40474029
///
40484030
/// This is the mutable version of [`slice::as_simd`]; see that for examples.
40494031
///

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.