dimforge / nphysics

2 and 3-dimensional rigid body physics engine for Rust.
https://nphysics.org
Apache License 2.0
1.62k stars 121 forks source link

Examples not building in Rust 1.11 (expected type nalgebra::structs::vector::Vector2<_>, found na::Vector2<_>) #73

Closed dlight closed 8 years ago

dlight commented 8 years ago

I can't make sense of this; shouldn't those types be the same?

Here's some compiler output:

$ rustc --version                                                                                                                                                                        
rustc 1.11.0 (9b21dcd6a 2016-08-15)
$ cd examples2d; cargo build --release                                                                                                                                                   
   Compiling nphysics-examples v0.1.0 (file:///q/x/nphysics/examples2d)
wall.rs:17:23: 17:46 collision_groups.rs:19:23: 19:46 error: mismatched types [E0308]
error: mismatched types [E0308]
collision_groups.rs:19     world.set_gravity(Vector2::new(0.0, 9.81));
                                             ^~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:19:23: 19:46 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:19:23: 19:46 note: expected type `nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:19:23: 19:46 note:    found type `na::Vector2<_>`
wall.rs:17     world.set_gravity(Vector2::new(0.0, 9.81));
                                 ^~~~~~~~~~~~~~~~~~~~~~~
wall.rs:17:23: 17:46 help: run `rustc --explain E0308` to see a detailed explanation
wall.rs:17:23: 17:46 note: expected type `nalgebra::structs::vector::Vector2<_>`
wall.rs:17:23: 17:46 note:    found type `na::Vector2<_>`
wall.rs:22:36: 22:46 collision_groups.rs:46:16: 46:26 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:46     let geom = Plane::new(Vector2::new(0.0, -1.0));
                                      ^~~~~~~~~~
collision_groups.rs:46:16: 46:26 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:46:16: 46:26 note: required by `ncollide::shape::Plane::new`
error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
wall.rs:22     let rb = RigidBody::new_static(Plane::new(Vector2::new(0.0, -1.0)), 0.3, 0.6);
                                              ^~~~~~~~~~
wall.rs:22:36: 22:46 help: run `rustc --explain E0277` to see a detailed explanation
wall.rs:22:36: 22:46 note: required by `ncollide::shape::Plane::new`
collision_groups.rs:47:26: 47:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:47     world.add_rigid_body(RigidBody::new_static(geom, 0.3, 0.6));
                                                manual_forces.rs:21:23: 21:46 ragdoll.rs:18:23: 18:46 ^~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:47:26: 47:47 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:47:26: 47:47 error: mismatched typesnote [E0308]: errorrequired by `nphysics2d::object::RigidBody::new_static`

: mismatched types [ragdoll.rs:18     world.set_gravity(Vector2::new(0.0, 9.81));
                                    ^~~~~~~~~~~~~~~~~~~~~~~
E0308]ragdoll.rs:18:23: 18:46 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:18:23: 18:46 note: expected type `nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:18:23: 18:46 note:    found type `na::Vector2<_>`

manual_forces.rs:21     world.set_gravity(Vector2::new(0.0, 9.81));
                                          ^~~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:21:23: 21:46 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:21:23: 21:46 wall.rs:22:14: 22:35 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
wall.rs:22     let rb = RigidBody::new_static(Plane::new(Vector2::new(0.0, -1.0)), 0.3, 0.6);
                        ^~~~~~~~~~~~~~~~~~~~~
wall.rs:22:14: 22:35 help: run `rustc --explain E0271` to see a detailed explanation
wall.rs:22:14: 22:35 note: required by `nphysics2d::object::RigidBody::new_static`
note: expected type `nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:21:23: 21:46 note:    found type `na::Vector2<_>`
ragdoll.rs:23:23: 23:33 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:23     let ground_geom = Plane::new(Vector2::new(0.0, -1.0));
                                    ^~~~~~~~~~
ragdoll.rs:23:23: 23:33 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:23:23: 23:33 note: required by `ncollide::shape::Plane::new`
manual_forces.rs:26:40: 26:50 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
manual_forces.rs:26     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(-1.0, -1.0)), 0.3, 0.6);
                                                           ^~~~~~~~~~
manual_forces.rs:26:40: 26:50 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:26:40: 26:50 note: required by `ncollide::shape::Plane::new`
collision_groups.rs:52:18: 52:29 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:52     let geom   = Cuboid::new(Vector2::new(10.0, 1.0));
                                        ^~~~~~~~~~~
collision_groups.rs:52:18: 52:29 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:52:18: 52:29 note: required by `ncollide::shape::Cuboid::new`
collision_groups.rs:53:18: 53:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:53     let mut rb = RigidBody::new_static(geom, 0.3, 0.6);
                                        ^~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:53:18: 53:39 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:53:18: 53:39 note: required by `nphysics2d::object::RigidBody::new_static`
collision_groups.rs:56:27: 56:51 error: mismatched types [E0308]
collision_groups.rs:56     rb.append_translation(&Vector2::new(0.0, -5.0));
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:56:27: 56:51 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:56:27: 56:51 note: expected type `&nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:56:27: 56:51 note:    found type `&na::Vector2<_>`
collision_groups.rs:59:43: 59:69 error: mismatched types [E0308]
collision_groups.rs:59     testbed.set_rigid_body_color(&handle, Point3::new(0.0, 1.0, 0.0));
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:59:43: 59:69 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:59:43: 59:69 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:59:43: 59:69 note:    found type `na::Point3<_>`
collision_groups.rs:64:18: 64:29 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:64     let geom   = Cuboid::new(Vector2::new(10.0, 1.0));
                                        ^~~~~~~~~~~
collision_groups.rs:64:18: 64:29 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:64:18: 64:29 note: required by `ncollide::shape::Cuboid::new`
collision_groups.rs:65:18: 65:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:65     let mut rb = RigidBody::new_static(geom, 0.3, 0.6);
                                        ^~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:65:18: 65:39 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:65:18: 65:39 note: required by `nphysics2d::object::RigidBody::new_static`
collision_groups.rs:68:27: 68:52 error: mismatched types [E0308]
collision_groups.rs:68     rb.append_translation(&Vector2::new(0.0, -10.0));
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:68:27: 68:52 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:68:27: 68:52 note: expected type `&nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:68:27: 68:52 note:    found type `&na::Vector2<_>`
manual_forces.rs:26:18: 26:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
manual_forces.rs:26     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(-1.0, -1.0)), 0.3, 0.6);
                                     ^~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:26:18: 26:39 help: run `rustc --explain E0271` to see a detailed explanation
manual_forces.rs:26:18: 26:39 note: required by `nphysics2d::object::RigidBody::new_static`
collision_groups.rs:71:43: 71:69 error: mismatched types [E0308]
collision_groups.rs:71     testbed.set_rigid_body_color(&handle, Point3::new(0.0, 0.0, 1.0));
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:71:43: 71:69 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:71:43: 71:69 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:71:43: 71:69 note:    found type `na::Point3<_>`
ragdoll.rs:25:26: 25:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:25     world.add_rigid_body(RigidBody::new_static(ground_geom, 0.3, 0.6));
                                       ^~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:25:26: 25:47 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:25:26: 25:47 note: required by `nphysics2d::object::RigidBody::new_static`
manual_forces.rs:28:27: 28:51 error: mismatched types [E0308]
manual_forces.rs:28     rb.append_translation(&Vector2::new(0.0, 10.0));
                                              ^~~~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:28:27: 28:51 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:28:27: 28:51 note: expected type `&nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:28:27: 28:51 note:    found type `&na::Vector2<_>`
manual_forces.rs:35:40: 35:50 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
manual_forces.rs:35     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(1.0, -1.0)), 0.3, 0.6);
                                                           ^~~~~~~~~~
manual_forces.rs:35:40: 35:50 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:35:40: 35:50 note: required by `ncollide::shape::Plane::new`
manual_forces.rs:35:18: 35:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
manual_forces.rs:35     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(1.0, -1.0)), 0.3, 0.6);
                                     ^~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:35:18: 35:39 help: run `rustc --explain E0271` to see a detailed explanation
manual_forces.rs:35:18: 35:39 note: required by `nphysics2d::object::RigidBody::new_static`
manual_forces.rs:37:27: 37:51 error: mismatched types [E0308]
manual_forces.rs:37     rb.append_translation(&Vector2::new(0.0, 10.0));
                                              ^~~~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:37:27: 37:51 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:37:27: 37:51 note: expected type `&nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:37:27: 37:51 note:    found type `&na::Vector2<_>`
ragdoll.rs:54:29: 54:61 error: mismatched types [E0308]
ragdoll.rs:54     head.append_translation(&(pos + Vector2::new(0.0, -2.4)));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:54:29: 54:61 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:54:29: 54:61 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:54:29: 54:61 note:    found type `&na::Vector2<f32>`
ragdoll.rs:57:25: 57:36 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:57     let     body_geom = Cuboid::new(Vector2::new(1.2, 0.5));
                                      ^~~~~~~~~~~
ragdoll.rs:57:25: 57:36 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:57:25: 57:36 note: required by `ncollide::shape::Cuboid::new`
ragdoll.rs:58:25: 58:47 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
ragdoll.rs:58     let mut body      = RigidBody::new_dynamic(body_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:58:25: 58:47 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:58:25: 58:47 help: the following implementations were found:
ragdoll.rs:58:25: 58:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
ragdoll.rs:58:25: 58:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
ragdoll.rs:58:25: 58:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:58:25: 58:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:58     let mut body      = RigidBody::new_dynamic(body_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:58:25: 58:47 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:58:25: 58:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:59:26: 59:64 error: mismatched types [E0308]
ragdoll.rs:59     body.append_rotation(&-Vector1::new(BaseFloat::frac_pi_2()));
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:59:26: 59:64 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:59:26: 59:64 note: expected type `&nalgebra::structs::vector::Vector1<_>`
ragdoll.rs:59:26: 59:64 note:    found type `&na::Vector1<_>`
ragdoll.rs:60:29: 60:33 error: mismatched types [E0308]
ragdoll.rs:60     body.append_translation(&pos);
                                          ^~~~
ragdoll.rs:60:29: 60:33 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:60:29: 60:33 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:60:29: 60:33 note:    found type `&na::Vector2<f32>`
ragdoll.rs:63:25: 63:36 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:63     let     rarm_geom = Cuboid::new(Vector2::new(1.6, 0.2));
                                      ^~~~~~~~~~~
ragdoll.rs:63:25: 63:36 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:63:25: 63:36 note: required by `ncollide::shape::Cuboid::new`
ragdoll.rs:64:25: 64:47 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
ragdoll.rs:64     let mut rarm      = RigidBody::new_dynamic(rarm_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:64:25: 64:47 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:64:25: 64:47 help: the following implementations were found:
ragdoll.rs:64:25: 64:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
ragdoll.rs:64:25: 64:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
ragdoll.rs:64:25: 64:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:64:25: 64:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:64     let mut rarm      = RigidBody::new_dynamic(rarm_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:64:25: 64:47 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:64:25: 64:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:65:29: 65:61 error: mismatched types [E0308]
ragdoll.rs:65     rarm.append_translation(&(pos + Vector2::new(2.4, -1.0)));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:65:29: 65:61 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:65:29: 65:61 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:65:29: 65:61 note:    found type `&na::Vector2<f32>`
ragdoll.rs:69:29: 69:53 error: mismatched types [E0308]
ragdoll.rs:69     larm.append_translation(&Vector2::new(-4.8, 0.0));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:69:29: 69:53 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:69:29: 69:53 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:69:29: 69:53 note:    found type `&na::Vector2<_>`
ragdoll.rs:72:26: 72:37 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:72     let     rfoot_geom = Cuboid::new(Vector2::new(1.6, 0.2));
                                       ^~~~~~~~~~~
ragdoll.rs:72:26: 72:37 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:72:26: 72:37 note: required by `ncollide::shape::Cuboid::new`
ragdoll.rs:73:26: 73:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
ragdoll.rs:73     let mut rfoot      = RigidBody::new_dynamic(rfoot_geom, 1.0, 0.3, 0.5);
                                       ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:73:26: 73:48 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:73:26: 73:48 help: the following implementations were found:
ragdoll.rs:73:26: 73:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
ragdoll.rs:73:26: 73:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
ragdoll.rs:73:26: 73:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:73:26: 73:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:73     let mut rfoot      = RigidBody::new_dynamic(rfoot_geom, 1.0, 0.3, 0.5);
                                       ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:73:26: 73:48 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:73:26: 73:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:74:27: 74:65 error: mismatched types [E0308]
ragdoll.rs:74     rfoot.append_rotation(&-Vector1::new(BaseFloat::frac_pi_2()));
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:74:27: 74:65 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:74:27: 74:65 note: expected type `&nalgebra::structs::vector::Vector1<_>`
ragdoll.rs:74:27: 74:65 note:    found type `&na::Vector1<_>`
ragdoll.rs:75:30: 75:61 error: mismatched types [E0308]
ragdoll.rs:75     rfoot.append_translation(&(pos + Vector2::new(0.4, 3.0)));
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:75:30: 75:61 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:75:30: 75:61 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:75:30: 75:61 note:    found type `&na::Vector2<f32>`
ragdoll.rs:79:30: 79:54 error: mismatched types [E0308]
ragdoll.rs:79     lfoot.append_translation(&Vector2::new(-0.8, 0.0));
                                           ^~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:79:30: 79:54 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:79:30: 79:54 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:79:30: 79:54 note:    found type `&na::Vector2<_>`
ragdoll.rs:103:41: 103:57 error: mismatched types [E0308]
ragdoll.rs:103     let head_joint  = BallInSocket::new(body_anchor_head,   head_anchor);
                                                       ^~~~~~~~~~~~~~~~
ragdoll.rs:103:41: 103:57 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:103:41: 103:57 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:103:41: 103:57 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:103:61: 103:72 error: mismatched types [E0308]
ragdoll.rs:103     let head_joint  = BallInSocket::new(body_anchor_head,   head_anchor);
                                                                           ^~~~~~~~~~~
ragdoll.rs:103:61: 103:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:103:61: 103:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:103:61: 103:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:104:41: 104:57 error: mismatched types [E0308]
ragdoll.rs:104     let rarm_joint  = BallInSocket::new(body_anchor_rarm,   rarm_anchor);
                                                       ^~~~~~~~~~~~~~~~
ragdoll.rs:104:41: 104:57 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:104:41: 104:57 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:104:41: 104:57 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:104:61: 104:72 error: mismatched types [E0308]
ragdoll.rs:104     let rarm_joint  = BallInSocket::new(body_anchor_rarm,   rarm_anchor);
                                                                           ^~~~~~~~~~~
ragdoll.rs:104:61: 104:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:104:61: 104:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:104:61: 104:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:105:41: 105:57 error: mismatched types [E0308]
ragdoll.rs:105     let larm_joint  = BallInSocket::new(body_anchor_larm,   larm_anchor);
                                                       ^~~~~~~~~~~~~~~~
ragdoll.rs:105:41: 105:57 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:105:41: 105:57 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:105:41: 105:57 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:105:61: 105:72 error: mismatched types [E0308]
ragdoll.rs:105     let larm_joint  = BallInSocket::new(body_anchor_larm,   larm_anchor);
                                                                           ^~~~~~~~~~~
ragdoll.rs:105:61: 105:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:105:61: 105:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:105:61: 105:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:106:41: 106:58 error: mismatched types [E0308]
ragdoll.rs:106     let rfoot_joint = BallInSocket::new(body_anchor_rfoot, rfoot_anchor);
                                                       ^~~~~~~~~~~~~~~~~
ragdoll.rs:106:41: 106:58 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:106:41: 106:58 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:106:41: 106:58 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:106:60: 106:72 error: mismatched types [E0308]
ragdoll.rs:106     let rfoot_joint = BallInSocket::new(body_anchor_rfoot, rfoot_anchor);
                                                                          ^~~~~~~~~~~~
ragdoll.rs:106:60: 106:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:106:60: 106:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:106:60: 106:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:107:41: 107:58 error: mismatched types [E0308]
ragdoll.rs:107     let lfoot_joint = BallInSocket::new(body_anchor_lfoot, lfoot_anchor);
                                                       ^~~~~~~~~~~~~~~~~
ragdoll.rs:107:41: 107:58 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:107:41: 107:58 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:107:41: 107:58 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:107:60: 107:72 error: mismatched types [E0308]
ragdoll.rs:107     let lfoot_joint = BallInSocket::new(body_anchor_lfoot, lfoot_anchor);
                                                                          ^~~~~~~~~~~~
ragdoll.rs:107:60: 107:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:107:60: 107:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:107:60: 107:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
error: aborting due to 30 previous errors
Build failed, waiting for other jobs to finish...
manual_forces.rs:68:24: 68:35 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
manual_forces.rs:68             let geom = Cuboid::new(Vector2::new(0.5, 0.5));
                                           ^~~~~~~~~~~
manual_forces.rs:68:24: 68:35 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:68:24: 68:35 note: required by `ncollide::shape::Cuboid::new`
manual_forces.rs:69:26: 69:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
manual_forces.rs:69             let mut rb = RigidBody::new_dynamic(geom, 0.1, 0.3, 0.6);
                                             ^~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:69:26: 69:48 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:69:26: 69:48 help: the following implementations were found:
manual_forces.rs:69:26: 69:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
manual_forces.rs:69:26: 69:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
manual_forces.rs:69:26: 69:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
manual_forces.rs:69:26: 69:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
manual_forces.rs:69             let mut rb = RigidBody::new_dynamic(geom, 0.1, 0.3, 0.6);
                                             ^~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:69:26: 69:48 help: run `rustc --explain E0271` to see a detailed explanation
manual_forces.rs:69:26: 69:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
manual_forces.rs:70:35: 70:54 error: mismatched types [E0308]
manual_forces.rs:70             rb.append_translation(&Vector2::new(x, y));
                                                      ^~~~~~~~~~~~~~~~~~~
manual_forces.rs:70:35: 70:54 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:70:35: 70:54 note: expected type `&nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:70:35: 70:54 note:    found type `&na::Vector2<f32>`
manual_forces.rs:111:50: 111:63 error: mismatched types [E0308]
manual_forces.rs:111                             obj.append_lin_force(force.clone());
                                                                      ^~~~~~~~~~~~~
manual_forces.rs:111:50: 111:63 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:111:50: 111:63 note: expected type `nalgebra::structs::vector::Vector2<f32>`
manual_forces.rs:111:50: 111:63 note:    found type `na::Vector2<f32>`
manual_forces.rs:134:50: 134:63 error: mismatched types [E0308]
manual_forces.rs:134                             obj.append_ang_force(force.clone());
                                                                      ^~~~~~~~~~~~~
manual_forces.rs:134:50: 134:63 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:134:50: 134:63 note: expected type `nalgebra::structs::vector::Vector1<f32>`
manual_forces.rs:134:50: 134:63 note:    found type `na::Vector1<f32>`
manual_forces.rs:148:55: 148:70 error: mismatched types [E0308]
manual_forces.rs:148                             obj.apply_central_impulse(impulse.clone());
                                                                           ^~~~~~~~~~~~~~~
manual_forces.rs:148:55: 148:70 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:148:55: 148:70 note: expected type `nalgebra::structs::vector::Vector2<f32>`
manual_forces.rs:148:55: 148:70 note:    found type `na::Vector2<f32>`
manual_forces.rs:163:56: 163:70 error: mismatched types [E0308]
manual_forces.rs:163                             obj.apply_angular_momentum(torque.clone());
                                                                            ^~~~~~~~~~~~~~
manual_forces.rs:163:56: 163:70 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:163:56: 163:70 note: expected type `nalgebra::structs::vector::Vector1<f32>`
manual_forces.rs:163:56: 163:70 note:    found type `na::Vector1<f32>`
error: aborting due to 15 previous errors
Build failed, waiting for other jobs to finish...
wall.rs:42:49: 42:60 error: the trait bound `na::Vector2<f32>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
wall.rs:42             let mut rb = RigidBody::new_dynamic(Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04)), 1.0, 0.3, 0.6);
                                                           ^~~~~~~~~~~
wall.rs:42:49: 42:60 help: run `rustc --explain E0277` to see a detailed explanation
wall.rs:42:49: 42:60 note: required by `ncollide::shape::Cuboid::new`
wall.rs:42:26: 42:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<f32>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
wall.rs:42             let mut rb = RigidBody::new_dynamic(Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04)), 1.0, 0.3, 0.6);
                                    ^~~~~~~~~~~~~~~~~~~~~~
wall.rs:42:26: 42:48 help: run `rustc --explain E0277` to see a detailed explanation
wall.rs:42:26: 42:48 help: the following implementations were found:
wall.rs:42:26: 42:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
wall.rs:42:26: 42:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
wall.rs:42:26: 42:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
wall.rs:42:26: 42:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<f32>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
wall.rs:42             let mut rb = RigidBody::new_dynamic(Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04)), 1.0, 0.3, 0.6);
                                    ^~~~~~~~~~~~~~~~~~~~~~
wall.rs:42:26: 42:48 help: run `rustc --explain E0271` to see a detailed explanation
wall.rs:42:26: 42:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
wall.rs:44:35: 44:54 error: mismatched types [E0308]
wall.rs:44             rb.append_translation(&Vector2::new(x, y));
                                             ^~~~~~~~~~~~~~~~~~~
wall.rs:44:35: 44:54 help: run `rustc --explain E0308` to see a detailed explanation
wall.rs:44:35: 44:54 note: expected type `&nalgebra::structs::vector::Vector2<_>`
wall.rs:44:35: 44:54 note:    found type `&na::Vector2<f32>`
error: aborting due to 7 previous errors
Build failed, waiting for other jobs to finish...
collision_groups.rs:87:26: 87:37 error: the trait bound `na::Vector2<f32>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:87             let geom   = Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04));
                                                ^~~~~~~~~~~
collision_groups.rs:87:26: 87:37 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:87:26: 87:37 note: required by `ncollide::shape::Cuboid::new`
collision_groups.rs:88:26: 88:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<f32>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
collision_groups.rs:88             let mut rb = RigidBody::new_dynamic(geom, 1.0, 0.3, 0.5);
                                                ^~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:88:26: 88:48 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:88:26: 88:48 help: the following implementations were found:
collision_groups.rs:88:26: 88:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
collision_groups.rs:88:26: 88:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
collision_groups.rs:88:26: 88:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
collision_groups.rs:88:26: 88:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<f32>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:88             let mut rb = RigidBody::new_dynamic(geom, 1.0, 0.3, 0.5);
                                                ^~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:88:26: 88:48 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:88:26: 88:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
collision_groups.rs:90:35: 90:55 error: mismatched types [E0308]
collision_groups.rs:90             rb.append_translation(&Vector2::new(x, -y));
                                                         ^~~~~~~~~~~~~~~~~~~~
collision_groups.rs:90:35: 90:55 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:90:35: 90:55 note: expected type `&nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:90:35: 90:55 note:    found type `&na::Vector2<f32>`
collision_groups.rs:96:55: 96:81 error: mismatched types [E0308]
collision_groups.rs:96                 testbed.set_rigid_body_color(&handle, Point3::new(0.0, 1.0, 0.0));
                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:96:55: 96:81 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:96:55: 96:81 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:96:55: 96:81 note:    found type `na::Point3<_>`
collision_groups.rs:101:55: 101:81 error: mismatched types [E0308]
collision_groups.rs:101                 testbed.set_rigid_body_color(&handle, Point3::new(0.0, 0.0, 1.0));
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:101:55: 101:81 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:101:55: 101:81 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:101:55: 101:81 note:    found type `na::Point3<_>`
error: aborting due to 17 previous errors
error: Could not compile `nphysics-examples`.

To learn more, run the command again with --verbose.
sebcrozet commented 8 years ago

I think it grabbed two different versions of nalgebra. The examples depend on version * of nalgebra while nphysics uses 0.9.*. So a fix would be to require the 0.9.* for the examples as well.

In other words, this is a "bug" in the examples' Cargo.toml.