stabilize ptr.is_aligned, move ptr.is_aligned_to to a new feature gate

This is an alternative to #121920
This commit is contained in:
Aria Beingessner 2024-03-03 14:44:15 -05:00
parent faae5f1ffe
commit ea92faec49
13 changed files with 30 additions and 51 deletions

View file

@ -1,7 +1,7 @@
//@ run-pass
//@ compile-flags: -C debug-assertions
#![feature(strict_provenance, pointer_is_aligned)]
#![feature(strict_provenance)]
#[repr(packed)]
struct Misaligner {

View file

@ -4,7 +4,7 @@
#![allow(dead_code)]
#![feature(generic_nonzero)]
#![feature(never_type)]
#![feature(pointer_is_aligned)]
#![feature(pointer_is_aligned_to)]
#![feature(strict_provenance)]
use std::mem::size_of;