Rollup merge of #50883 - dlrobertson:fix_warning, r=TimNN

Fix warning when building stage0 libcore

When building stage0 a warning will be triggered when compiling libcore
due to `align_to_offsets` not being used.
This commit is contained in:
kennytm 2018-05-19 23:41:05 +08:00
commit 9f34c7feea
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C

View file

@ -1698,6 +1698,7 @@ impl<T> [T] {
}
/// Function to calculate lenghts of the middle and trailing slice for `align_to{,_mut}`.
#[cfg(not(stage0))]
fn align_to_offsets<U>(&self) -> (usize, usize) {
// What we gonna do about `rest` is figure out what multiple of `U`s we can put in a
// lowest number of `T`s. And how many `T`s we need for each such "multiple".