On Thu, 20 Mar 2025 at 15:25, Zhao Liu wrote:
>
> > -use std::{ffi::CStr, ptr::addr_of_mut};
> > +use std::{ffi::CStr, mem, ptr::addr_of_mut};
>
> maybe mem::size_of (since there're 2 use cases :-))?
>
> >
> > use qemu_api::{
> > +bindings,
> > chardev::{CharBackend, Chardev, Event},
> >
> > > +// Some C users of this device embed its state struct into their own
> > > +// structs, so the size of the Rust version must not be any larger
> > > +// than the size of the C one. If this assert triggers you need to
> > > +// expand the padding_for_rust[] array in the C PL011State struct.
>
> -use std::{ffi::CStr, ptr::addr_of_mut};
> +use std::{ffi::CStr, mem, ptr::addr_of_mut};
maybe mem::size_of (since there're 2 use cases :-))?
>
> use qemu_api::{
> +bindings,
> chardev::{CharBackend, Chardev, Event},
> +static_assert,
This one looks like it breaks the alphabet