Skip to content

Does not compile on nightly #302

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

Closed
samsartor opened this issue Nov 28, 2017 · 2 comments
Closed

Does not compile on nightly #302

samsartor opened this issue Nov 28, 2017 · 2 comments

Comments

@samsartor
Copy link

rustc 1.24.0-nightly (560a5da9f 2017-11-27) + nalgebra v0.13.1 gives the following compiler error(s):

error[E0119]: conflicting implementations of trait `std::ops::Mul<&_>` for type `geometry::translation::Translation<_, _>`:
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.13.1/src/geometry/isometry_ops.rs:67:9
    |
67  |            impl<$($lives ,)* N: Real, D: DimName, R> $Op<$Rhs> for $Lhs
    |   _________^
    |  |_________|
    | ||
68  | ||             where R: AlgaRotation<Point<N, D>>,
69  | ||                   DefaultAllocator: Allocator<N, D> {
70  | ||             type Output = $Output;
...   ||
75  | ||             }
76  | ||         }
    | ||         ^
    | ||_________|
    | |__________first implementation here
    |            conflicting implementation for `geometry::translation::Translation<_, _>`
...
281 | /  isometry_binop_impl_all!(
282 | |      Mul, mul;
283 | |      self: Translation<N, D>, right: R, Output = Isometry<N, D, R>;
284 | |      [val val] => Isometry::from_parts(self, right);
...   |
287 | |      [ref ref] => Isometry::from_parts(self.clone(), right.clone());
288 | |  );
    | |___- in this macro invocation
    |
    = note: upstream crates may add new impl of trait `alga::linear::Rotation<geometry::point::Point<_, _>>` for type `&_` in future versions
error[E0119]: conflicting implementations of trait `std::ops::Mul<&_>` for type `&geometry::translation::Translation<_, _>`:
   --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.13.1/src/geometry/isometry_ops.rs:67:9
    |
67  |            impl<$($lives ,)* N: Real, D: DimName, R> $Op<$Rhs> for $Lhs
    |   _________^
    |  |_________|
    | ||
68  | ||             where R: AlgaRotation<Point<N, D>>,
69  | ||                   DefaultAllocator: Allocator<N, D> {
70  | ||             type Output = $Output;
...   ||
75  | ||             }
76  | ||         }
    | ||         ^
    | ||_________|
    | |__________first implementation here
    |            conflicting implementation for `&geometry::translation::Translation<_, _>`
...
281 | /  isometry_binop_impl_all!(
282 | |      Mul, mul;
283 | |      self: Translation<N, D>, right: R, Output = Isometry<N, D, R>;
284 | |      [val val] => Isometry::from_parts(self, right);
...   |
287 | |      [ref ref] => Isometry::from_parts(self.clone(), right.clone());
288 | |  );
    | |___- in this macro invocation
    |
    = note: upstream crates may add new impl of trait `alga::linear::Rotation<geometry::point::Point<_, _>>` for type `&_` in future versions
@samsartor
Copy link
Author

Possibly related to rust-lang/rust#46328?

@samsartor
Copy link
Author

It looks like the latest nightly works again. However, if I understand correctly, the breaking change was intentional and will return to rust eventually. Keep an eye out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant