-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Associated type equality in trait bounds not properly matched #37883
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
Comments
sebcrozet
added a commit
to dimforge/alga
that referenced
this issue
Dec 4, 2016
Changelog: * The `Real` trait now includes some commonly implemented markers, e.g., Sync, Any, 'static, etc. * The `Module` trait no longer inherit from operator overload traits. This is due to a [limitation](rust-lang/rust#37883) in the compiler that prevent them from being used properly in generic code. * The `Transform` trait is split into `Transform` and `ProjectiveTransform`. Inverse transformation methods have been moved from the first to the second. * The `Affine` trait now has methods for appending/prepending pure translation/rotation/scaling. * `EuclideanSpace::Vector` has been renamed `EuclideanSpace::Coordinates`. * Added `Rotation::scaled_rotation_between` wich is a combination of `Rotation::rotation_between` and `Rotation::powf`. * `FiniteDimVectorSpace` looses `::component` but gains the `::component_unchecked_mut` method (for mutable compoent borrowing without bound-checking). * Added `EuclideanSpace::from_coordinates` that builds a point from its coordinates.
apasel422
added
A-associated-items
Area: Associated items (types, constants & functions)
A-trait-system
Area: Trait system
labels
Dec 28, 2016
Smaller test case (Playground):
This code (in the body of |
estebank
added
F-associated_type_bounds
`#![feature(associated_type_bounds)]`
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
labels
Nov 5, 2019
Current output:
|
matthewjasper
added
the
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
label
Jul 11, 2020
estebank
added
the
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
label
Feb 2, 2021
This now compiles. |
jackh726
removed
the
F-associated_type_bounds
`#![feature(associated_type_bounds)]`
label
Feb 2, 2021
jackh726
added a commit
to jackh726/rust
that referenced
this issue
Feb 2, 2021
Add more associated type tests Closes rust-lang#24159 Closes rust-lang#37808 Closes rust-lang#39532 Closes rust-lang#37883 r? `@estebank`
xmas7
pushed a commit
to RubyOnWorld/alga
that referenced
this issue
Sep 6, 2022
Changelog: * The `Real` trait now includes some commonly implemented markers, e.g., Sync, Any, 'static, etc. * The `Module` trait no longer inherit from operator overload traits. This is due to a [limitation](rust-lang/rust#37883) in the compiler that prevent them from being used properly in generic code. * The `Transform` trait is split into `Transform` and `ProjectiveTransform`. Inverse transformation methods have been moved from the first to the second. * The `Affine` trait now has methods for appending/prepending pure translation/rotation/scaling. * `EuclideanSpace::Vector` has been renamed `EuclideanSpace::Coordinates`. * Added `Rotation::scaled_rotation_between` wich is a combination of `Rotation::rotation_between` and `Rotation::powf`. * `FiniteDimVectorSpace` looses `::component` but gains the `::component_unchecked_mut` method (for mutable compoent borrowing without bound-checking). * Added `EuclideanSpace::from_coordinates` that builds a point from its coordinates.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I might be missing something but I believe the following (playpen) should compile but does not:
In
self.to_vector() * n
, the compiler seems to understand that<E::Coordinates as Module>::Ring>
is the same thing asE::Real
but fails to applies theMul<<Self as Module>::Ring, Output = Self>
trait fromModule
.The text was updated successfully, but these errors were encountered: