This commit is contained in:
The Miri Conjob Bot 2024-02-08 05:14:42 +00:00
parent c232e94bc1
commit 964a576dc0
2 changed files with 2 additions and 3 deletions

View file

@ -4,8 +4,7 @@ extern "C" {
static _dispatch_queue_attr_concurrent: [u8; 0];
}
static DISPATCH_QUEUE_CONCURRENT: &'static [u8; 0] =
unsafe { &_dispatch_queue_attr_concurrent };
static DISPATCH_QUEUE_CONCURRENT: &'static [u8; 0] = unsafe { &_dispatch_queue_attr_concurrent };
fn main() {
let _val = *DISPATCH_QUEUE_CONCURRENT; //~ERROR: is not supported

View file

@ -113,7 +113,7 @@ fn vtable() {
let ptr: &dyn Send = &0;
let parts: (*const (), *const u8) = unsafe { mem::transmute(ptr) };
let vtable = parts.1 ;
let vtable = parts.1;
let offset = vtable.align_offset(mem::align_of::<TWOPTR>());
let _vtable_aligned = vtable.wrapping_add(offset) as *const [TWOPTR; 0];
// FIXME: we can't actually do the access since vtable pointers act like zero-sized allocations.