Skip to content

Commit 8b02488

Browse files
committed
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.
1 parent 37a4091 commit 8b02488

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/slice/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1698,6 +1698,7 @@ impl<T> [T] {
16981698
}
16991699

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

0 commit comments

Comments
 (0)