use rkyv::Archive; use rkyv_impl::*; #[derive(Archive)] pub struct Foo { field: Vec, } #[archive_impl(add_bounds(T: Archive))] impl Foo { fn get_slice(&self) -> &[T] { &self.field } } // This shows that the generated trait bounds do not apply to the original impl. fn main() { struct NonArchive(u32); let foo = Foo { field: vec![NonArchive(1), NonArchive(2), NonArchive(3)], }; let _ = foo.get_slice(); }