mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Bump stage0 to 1.96 beta
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
use std::marker::PointeeSized;
|
||||
#[cfg(not(bootstrap))]
|
||||
use std::mem::Alignment;
|
||||
#[cfg(bootstrap)]
|
||||
use std::ptr::Alignment;
|
||||
|
||||
/// Returns the ABI-required minimum alignment of a type in bytes.
|
||||
///
|
||||
|
||||
@@ -56,9 +56,6 @@ pub unsafe trait Tag: Copy {
|
||||
/// (this is based on `T`'s alignment).
|
||||
pub const fn bits_for<T: ?Sized + Aligned>() -> u32 {
|
||||
let alignment = crate::aligned::align_of::<T>();
|
||||
#[cfg(bootstrap)]
|
||||
let alignment = alignment.as_nonzero();
|
||||
#[cfg(not(bootstrap))]
|
||||
let alignment = alignment.as_nonzero_usize();
|
||||
alignment.trailing_zeros()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user