about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-05-19 23:41:05 +0800
committerkennytm <kennytm@gmail.com>2018-05-20 04:16:11 +0800
commit9f34c7feea4bdb3b1b4d7d4c8be56ed70775946f (patch)
tree69c0733db8fe42ba899c829952432f3b769abc43 /src
parent974396b991de4b499491a8524d85e575a93888b6 (diff)
parent8b024888349f2c28b74c6697a33572dbd0d077b0 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/libcore/slice/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index fdc9aa473e8..3b19a401859 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -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".