fn problematic_function(material_surface_element: ()) where DefaultAllocator: FiniteElementAllocator<(), Space>, { let _: Point2 = material_surface_element.map_reference_coords().into(); } impl Allocator for DefaultAllocator where R::Value: DimName, //~ ERROR: `Value` not found for `R` { type Buffer = (); } impl Allocator for DefaultAllocator {} //~^ ERROR: conflicting implementations impl DimName for () {} impl DimName for u32 {} impl From> for Point { fn from(_: VectorN) -> Self { todo!() } } impl FiniteElement for () {} type VectorN = Matrix<>::Buffer>; type Point2 = Point; struct DefaultAllocator; struct Matrix(S); struct Point(N, D); trait Allocator { type Buffer; } trait DimName {} trait FiniteElementAllocator: Allocator + Allocator { } trait FiniteElement { fn map_reference_coords(&self) -> VectorN { todo!() } } fn main() {}