diff options
| author | bors <bors@rust-lang.org> | 2020-09-19 11:29:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-19 11:29:00 +0000 |
| commit | 8e9d5db8392c44a2e94008168fa3506ecddaa357 (patch) | |
| tree | 472f315c893af1563360259b2389760df6df9aeb /compiler/rustc_data_structures/src | |
| parent | fd702d2919fe23eeaf59574040d0b29853d44289 (diff) | |
| parent | b4c3f409af031a4bcc2cf1bb693789201a33ec1c (diff) | |
| download | rust-8e9d5db8392c44a2e94008168fa3506ecddaa357.tar.gz rust-8e9d5db8392c44a2e94008168fa3506ecddaa357.zip | |
Auto merge of #76912 - RalfJung:rollup-q9ur56h, r=RalfJung
Rollup of 14 pull requests Successful merges: - #73963 (deny(unsafe_op_in_unsafe_fn) in libstd/path.rs) - #75099 (lint/ty: move fns to avoid abstraction violation) - #75502 (Use implicit (not explicit) rules for promotability by default in `const fn`) - #75580 (Add test for checking duplicated branch or-patterns) - #76310 (Add `[T; N]: TryFrom<Vec<T>>` (insta-stable)) - #76400 (Clean up vec benches bench_in_place style) - #76434 (do not inline black_box when building for Miri) - #76492 (Add associated constant `BITS` to all integer types) - #76525 (Add as_str() to string::Drain.) - #76636 (assert ScalarMaybeUninit size) - #76749 (give *even better* suggestion when matching a const range) - #76757 (don't convert types to the same type with try_into (clippy::useless_conversion)) - #76796 (Give a better error message when x.py uses the wrong stage for CI) - #76798 (Build fixes for RISC-V 32-bit Linux support) Failed merges: r? `@ghost`
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/tagged_ptr/copy.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 88c160e93b6..06718cc9803 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -14,6 +14,7 @@ #![feature(generators)] #![feature(generator_trait)] #![feature(fn_traits)] +#![feature(int_bits_const)] #![feature(min_specialization)] #![feature(optin_builtin_traits)] #![feature(nll)] diff --git a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs index d39d146db31..d63bcdb3c2b 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/copy.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/copy.rs @@ -48,7 +48,7 @@ where P: Pointer, T: Tag, { - const TAG_BIT_SHIFT: usize = (8 * std::mem::size_of::<usize>()) - T::BITS; + const TAG_BIT_SHIFT: usize = usize::BITS as usize - T::BITS; const ASSERTION: () = { assert!(T::BITS <= P::BITS); // Used for the transmute_copy's below |
