> +fn derive_opaque_or_error(input: DeriveInput) ->
> Result {
> +is_transparent_repr(&input, "#[derive(Wrapper)]")?;
> +
> +let name = &input.ident;
> +let field = &get_unnamed_field(&input, "#[derive(Wrapper)]")?;
> +let typ = &field.ty;
> +
> +// TODO: how to add "::qemu_api
Add a derive macro that makes it easy to peel off all the layers of
specialness (UnsafeCell, MaybeUninit, etc.) and just get a pointer
to the wrapped type; and likewise add them back starting from a
*mut.
Signed-off-by: Paolo Bonzini
---
docs/devel/rust.rst | 8 ++--
rust/qemu-api-m