use read_only::cast;

mod m {
    use super::cast;

    #[cast]
    pub struct Wrapper<T> {
        pub value: T,
    }

    impl<T> Wrapper<T> {
        pub fn new(value: T) -> Self {
            Self { value }
        }
    }
}

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