Skip to content
Permalink
Browse files

Type inference regression? Update to the lust rust-nigthly

This fixed type-inference related errors. Works on master but not on the nightlies so this looks
like a regression on the compiler-side.

Version of rustc: 1.3.0-nightly (67256dff6 2015-07-09).
  • Loading branch information...
sebcrozet committed Jul 11, 2015
1 parent bcbe63b commit 2f07d5a8b36f3e1b57f0b80669d52f6ad14e9112
@@ -1,6 +1,6 @@
[package]
name = "ncollide_pipeline"
version = "0.2.1"
version = "0.2.2"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]

description = "2 and 3-dimensional collision detection library in Rust: module describing the collision detection pipeline (broad phase/narrow phase) of ncollide."
@@ -66,12 +66,13 @@ impl<P, M> CollisionDetector<P, M> for PlaneSupportMap<P, M>
_: &CollisionDispatcher<P, M>,
ma: &M,
plane: &Repr<P, M>,
mb: &M, b: &Repr<P, M>)
mb: &M,
b: &Repr<P, M>)
-> bool {
let rp = plane.repr();

if let (Some(p), Some(sm)) =
(rp.downcast_ref::<Plane<P::Vect>>(), inspection::maybe_as_support_map(b)) {
(rp.downcast_ref::<Plane<P::Vect>>(), inspection::maybe_as_support_map::<P, M, _>(b)) {
self.contact = contacts_internal::plane_against_support_map(ma, p, mb, sm, self.prediction);

true
@@ -112,7 +113,7 @@ impl<P, M> CollisionDetector<P, M> for SupportMapPlane<P, M>
let rp = plane.repr();

if let (Some(sm), Some(p)) =
(inspection::maybe_as_support_map(a), rp.downcast_ref::<Plane<P::Vect>>()) {
(inspection::maybe_as_support_map::<P, M, _>(a), rp.downcast_ref::<Plane<P::Vect>>()) {
self.contact = contacts_internal::support_map_against_plane(ma, sm, mb, p, self.prediction);

true
@@ -54,7 +54,7 @@ impl<P, M, S> CollisionDetector<P, M> for SupportMapSupportMap<P, M, S>
mb: &M,
b: &Repr<P, M>)
-> bool {
if let (Some(sma), Some(smb)) = (inspection::maybe_as_support_map(a), inspection::maybe_as_support_map(b)) {
if let (Some(sma), Some(smb)) = (inspection::maybe_as_support_map::<P, M, _>(a), inspection::maybe_as_support_map::<P, M, _>(b)) {
let initial_direction = match self.contact {
GJKResult::NoIntersection(ref separator) => Some(separator.clone()),
GJKResult::Projection(ref contact) => Some(contact.normal.clone()),
@@ -1,6 +1,6 @@
[package]
name = "ncollide_queries"
version = "0.2.2"
version = "0.2.3"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]

description = "2 and 3-dimensional collision detection library in Rust: module for geometric queries like distances computation, ray casting and contact determination."
@@ -36,7 +36,7 @@ pub fn any_against_any<P, M, G1: ?Sized, G2: ?Sized>(m1: &M, g1: &G1, m2: &M, g2
}
else if let (Some(s1), Some(s2)) =
(inspection::maybe_repr_desc_as_support_map::<P, M>(r1), inspection::maybe_repr_desc_as_support_map::<P, M>(r2)) {
distance_internal::support_map_against_support_map(m1, s1, m2, s2)
distance_internal::support_map_against_support_map::<P, _, _, _>(m1, s1, m2, s2)
}
else if let Some(c1) = inspection::maybe_repr_desc_as_composite_shape::<P, M>(r1) {
distance_internal::composite_shape_against_any(m1, c1, m2, g2)
@@ -1,6 +1,6 @@
[package]
name = "ncollide_utils"
version = "0.2.1"
version = "0.2.2"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]


@@ -195,10 +195,11 @@ impl<K: PartialEq, V, H: HashFun<K>> HashMap<K, V, H> {
pub fn get_and_remove(&mut self, key: &K) -> Option<Entry<K, V>> {
let h = self.hash.hash(key) & self.mask;

let mut obji;
let mut o = self.htable[h];

if o != -1 {
let obji;

if self.table[o as usize].key != *key {
while self.next[o as usize] != -1 && self.table[self.next[o as usize] as usize].key != *key {
o = self.next[o as usize]

0 comments on commit 2f07d5a

Please sign in to comment.
You can’t perform that action at this time.