You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
405 B
20 lines
405 B
use pin_project_lite::pin_project;
|
|
|
|
pin_project! { //~ ERROR borrow of packed field is unsafe and requires unsafe function or block
|
|
#[repr(packed, C)]
|
|
struct A {
|
|
#[pin]
|
|
field: u16,
|
|
}
|
|
}
|
|
|
|
pin_project! { //~ ERROR borrow of packed field is unsafe and requires unsafe function or block
|
|
#[repr(packed(2))]
|
|
struct C {
|
|
#[pin]
|
|
field: u32,
|
|
}
|
|
}
|
|
|
|
fn main() {}
|