use read_only::embed;

mod m {
    use super::embed;

    #[embed]
    pub struct Wrapper<T: Copy> {
        #[readonly]
        pub value: T,
        pub extra: i32,
    }

    impl<T: Copy> Wrapper<T> {
        pub fn new(value: T, extra: i32) -> Self {
            Self {
                read_only: ReadOnlyWrapper { value },
                extra,
            }
        }
    }
}

fn main() {
    let v = m::Wrapper::new(42, 0);
    let _ = v.value;
    let _ = v.extra;
}
