diff --git a/narrow-derive/tests/expand/struct/named/generic.expanded.rs b/narrow-derive/tests/expand/struct/named/generic.expanded.rs index d90b08b..285b7d0 100644 --- a/narrow-derive/tests/expand/struct/named/generic.expanded.rs +++ b/narrow-derive/tests/expand/struct/named/generic.expanded.rs @@ -30,7 +30,11 @@ impl<'a, T: narrow::array::ArrayType> narrow::array::StructArrayType for Foo< where T: Copy, { - type Array = FooArray<'a, T, Buffer>; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray<'a, T, Buffer>; } struct FooArray<'a, T: narrow::array::ArrayType, Buffer: narrow::buffer::BufferType> where diff --git a/narrow-derive/tests/expand/struct/named/generic_option.expanded.rs b/narrow-derive/tests/expand/struct/named/generic_option.expanded.rs index 6a869d5..deb9cb0 100644 --- a/narrow-derive/tests/expand/struct/named/generic_option.expanded.rs +++ b/narrow-derive/tests/expand/struct/named/generic_option.expanded.rs @@ -19,7 +19,11 @@ for ::std::option::Option> { > = narrow::array::StructArray, true, Buffer>; } impl> narrow::array::StructArrayType for Bar { - type Array = BarArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = BarArray; } struct BarArray, Buffer: narrow::buffer::BufferType> { a: for ::std::option::Option { > = narrow::array::StructArray; } impl narrow::array::StructArrayType for Foo { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } struct FooArray { a: narrow::array::ArrayType> for ::std::option::Option< > = narrow::array::StructArray, true, Buffer>; } impl narrow::array::StructArrayType for Foo { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } pub struct FooArray( pub narrow::array::NullArray, false, Buffer>, diff --git a/narrow-derive/tests/expand/struct/unit/const_generic_default.expanded.rs b/narrow-derive/tests/expand/struct/unit/const_generic_default.expanded.rs index 972f2f0..a9e699c 100644 --- a/narrow-derive/tests/expand/struct/unit/const_generic_default.expanded.rs +++ b/narrow-derive/tests/expand/struct/unit/const_generic_default.expanded.rs @@ -19,7 +19,11 @@ impl narrow::array::ArrayType> for ::std::option::Option< > = narrow::array::StructArray, true, Buffer>; } impl narrow::array::StructArrayType for Foo { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } pub struct FooArray( pub narrow::array::NullArray, false, Buffer>, diff --git a/narrow-derive/tests/expand/struct/unit/self.expanded.rs b/narrow-derive/tests/expand/struct/unit/self.expanded.rs index 61da210..f0bb5d3 100644 --- a/narrow-derive/tests/expand/struct/unit/self.expanded.rs +++ b/narrow-derive/tests/expand/struct/unit/self.expanded.rs @@ -33,7 +33,11 @@ impl narrow::array::StructArrayType for Foo where Self: Debug, { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } struct FooArray( narrow::array::NullArray, diff --git a/narrow-derive/tests/expand/struct/unit/simple.expanded.rs b/narrow-derive/tests/expand/struct/unit/simple.expanded.rs index e34b02f..6853eef 100644 --- a/narrow-derive/tests/expand/struct/unit/simple.expanded.rs +++ b/narrow-derive/tests/expand/struct/unit/simple.expanded.rs @@ -19,7 +19,11 @@ impl narrow::array::ArrayType for ::std::option::Option { > = narrow::array::StructArray; } impl narrow::array::StructArrayType for Foo { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } struct FooArray( narrow::array::NullArray, diff --git a/narrow-derive/tests/expand/struct/unit/where_clause.expanded.rs b/narrow-derive/tests/expand/struct/unit/where_clause.expanded.rs index 2dd37ca..d6d2917 100644 --- a/narrow-derive/tests/expand/struct/unit/where_clause.expanded.rs +++ b/narrow-derive/tests/expand/struct/unit/where_clause.expanded.rs @@ -38,7 +38,11 @@ where Self: Sized, (): From, { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } pub(super) struct FooArray( pub(super) narrow::array::NullArray, false, Buffer>, diff --git a/narrow-derive/tests/expand/struct/unnamed/generic.expanded.rs b/narrow-derive/tests/expand/struct/unnamed/generic.expanded.rs index 18d3b4a..d43309e 100644 --- a/narrow-derive/tests/expand/struct/unnamed/generic.expanded.rs +++ b/narrow-derive/tests/expand/struct/unnamed/generic.expanded.rs @@ -34,7 +34,11 @@ where Self: Sized, >::Output: Debug, { - type Array = FooArray<'a, T, Buffer>; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray<'a, T, Buffer>; } struct FooArray< 'a, @@ -227,7 +231,11 @@ for ::std::option::Option> { > = narrow::array::StructArray, true, Buffer>; } impl> narrow::array::StructArrayType for FooBar { - type Array = FooBarArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooBarArray; } struct FooBarArray, Buffer: narrow::buffer::BufferType>( > { > = narrow::array::StructArray, true, Buffer>; } impl<'a, T: narrow::array::ArrayType> narrow::array::StructArrayType for Foo<'a, T> { - type Array = FooArray<'a, T, Buffer>; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray<'a, T, Buffer>; } struct FooArray<'a, T: narrow::array::ArrayType, Buffer: narrow::buffer::BufferType>( <&'a T as narrow::array::ArrayType< diff --git a/narrow-derive/tests/expand/struct/unnamed/multiple.expanded.rs b/narrow-derive/tests/expand/struct/unnamed/multiple.expanded.rs index 702782c..254575c 100644 --- a/narrow-derive/tests/expand/struct/unnamed/multiple.expanded.rs +++ b/narrow-derive/tests/expand/struct/unnamed/multiple.expanded.rs @@ -14,7 +14,11 @@ impl narrow::array::ArrayType for ::std::option::Option { > = narrow::array::StructArray; } impl narrow::array::StructArrayType for Bar { - type Array = BarArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = BarArray; } struct BarArray( for ::std::option::Option { > = narrow::array::StructArray; } impl narrow::array::StructArrayType for Foo { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } struct FooArray( for ::std::option::Option { > = narrow::array::StructArray; } impl narrow::array::StructArrayType for Bar { - type Array = BarArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = BarArray; } struct BarArray( > narrow::array::StructArrayType for Foo where T: Copy, { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } struct FooArray, Buffer: narrow::buffer::BufferType>( > { > = narrow::array::StructArray, true, Buffer>; } impl<'a, T: narrow::array::ArrayType> narrow::array::StructArrayType for Bar<'a, T> { - type Array = BarArray<'a, T, Buffer>; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = BarArray<'a, T, Buffer>; } struct BarArray<'a, T: narrow::array::ArrayType, Buffer: narrow::buffer::BufferType>( <&'a Foo< @@ -385,7 +393,11 @@ impl<'a> narrow::array::ArrayType> for ::std::option::Option = narrow::array::StructArray, true, Buffer>; } impl<'a> narrow::array::StructArrayType for FooBar<'a> { - type Array = FooBarArray<'a, Buffer>; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooBarArray<'a, Buffer>; } struct FooBarArray<'a, Buffer: narrow::buffer::BufferType>( > { > = narrow::array::StructArray, true, Buffer>; } impl> narrow::array::StructArrayType for Foo { - type Array = FooArray; + type Array< + Buffer: narrow::buffer::BufferType, + OffsetItem: narrow::offset::OffsetElement, + UnionLayout: narrow::array::union::UnionType, + > = FooArray; } struct FooArray< T: Sized + narrow::array::ArrayType,