diff options
| author | Jake Goulding <jake.goulding@gmail.com> | 2019-08-05 11:57:55 -0400 |
|---|---|---|
| committer | Jake Goulding <jake.goulding@gmail.com> | 2019-08-05 19:44:07 -0400 |
| commit | 571e22d7e82d471a38ebba1e6fdeed635b2a9953 (patch) | |
| tree | 292686368f66316ca43c4ad6076637445d6785f2 /src/libcore | |
| parent | 4be067558962c004b638e4c6f162d50f7c0c98b6 (diff) | |
| download | rust-571e22d7e82d471a38ebba1e6fdeed635b2a9953.tar.gz rust-571e22d7e82d471a38ebba1e6fdeed635b2a9953.zip | |
Clarify align_to's requirements and obligations
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/slice/mod.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index c8257d30488..d5a34ea2bd5 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -2308,9 +2308,10 @@ impl<T> [T] { /// maintained. /// /// This method splits the slice into three distinct slices: prefix, correctly aligned middle - /// slice of a new type, and the suffix slice. The method does a best effort to make the - /// middle slice the greatest length possible for a given type and input slice, but only - /// your algorithm's performance should depend on that, not its correctness. + /// slice of a new type, and the suffix slice. The method may make the middle slice the greatest + /// length possible for a given type and input slice, but only your algorithm's performance + /// should depend on that, not its correctness. It is permissible for all of the input data to + /// be returned as the prefix or suffix slice. /// /// This method has no purpose when either input element `T` or output element `U` are /// zero-sized and will return the original slice without splitting anything. @@ -2361,9 +2362,10 @@ impl<T> [T] { /// maintained. /// /// This method splits the slice into three distinct slices: prefix, correctly aligned middle - /// slice of a new type, and the suffix slice. The method does a best effort to make the - /// middle slice the greatest length possible for a given type and input slice, but only - /// your algorithm's performance should depend on that, not its correctness. + /// slice of a new type, and the suffix slice. The method may make the middle slice the greatest + /// length possible for a given type and input slice, but only your algorithm's performance + /// should depend on that, not its correctness. It is permissible for all of the input data to + /// be returned as the prefix or suffix slice. /// /// This method has no purpose when either input element `T` or output element `U` are /// zero-sized and will return the original slice without splitting anything. |
