Rollup merge of #91972 - RalfJung:pref-align-of, r=Mark-Simulacrum

link to pref_align_of tracking issue

If we are not going to remove this intrinsic (https://github.com/rust-lang/rust/pull/90877), I think we should at least have a place to centralize discussion around it, so here we go. Intrinsics don't have their own separate features and usually we instead use the public method for tracking it, but this one does not have such a method... so the tracking issue is just a regular link. (And then we sue it for the const part as well.)
This commit is contained in:
Matthias Krüger 2021-12-16 10:12:46 +01:00 committed by GitHub
commit 311c2d9e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -811,7 +811,8 @@ extern "rust-intrinsic" {
/// The preferred alignment of a type.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "none")]
/// It's "tracking issue" is [#91971](https://github.com/rust-lang/rust/issues/91971).
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
pub fn pref_align_of<T>() -> usize;
/// The size of the referenced value in bytes.