You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to compile the following code, the compiler mistakenly rejects it, complaining that the Point type returned by max doesn't implement Sub<Self::D::Vector>. However, Pointdoes implement the trait - it's just that EuclideanSpace::Diff is being aliased through Dimensionality::Vector.
It seems the only way to make that code compile is to redefine Dimensionality as follows, removing the alias between EuclideanSpace::Diff and Dimensionality::Vector:
When attempting to compile the following code, the compiler mistakenly rejects it, complaining that the
Point
type returned bymax
doesn't implementSub<Self::D::Vector>
. However,Point
does implement the trait - it's just thatEuclideanSpace::Diff
is being aliased throughDimensionality::Vector
.Playground link
Redefining
fn dims
as follows so that it directly returns the requested type also fails to compile, with the same error:Playground link
It seems the only way to make that code compile is to redefine
Dimensionality
as follows, removing the alias betweenEuclideanSpace::Diff
andDimensionality::Vector
:Playground link
This is happening on all versions of the compiler I've tested, one of those being stable 1.29.0.
The text was updated successfully, but these errors were encountered: