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
implCast<f32>forfloat{fncast(&self) -> f32{selfasf32}}implCast<int>forf32{fncast(&self) -> int{selfasint}}impl<T:Cast<U>,U>Cast<Vec3<U>>forVec3<T>{fncast(&self) -> Vec3<U>{Vec3{x:self.xasU,y:self.yasU,z:self.zasU}}}typeVec3f = Vec3<float>;typeVec3f32 = Vec3<f32>;typeVec3i = Vec3<int>;fnmain(){let a = Vec3{x:1f,y:1f,z:1f };let b = a asVec3f32;let c = b asVec3i;}
Perhaps there could be a deriving attribute as well:
Activity
emberian commentedon Jun 22, 2013
See #7080
emberian commentedon Jul 13, 2013
(closing as dup)
Auto merge of rust-lang#6016 - giraffate:restrict_same_item_push, r=e…
Auto merge of rust-lang#6115 - ebroto:changelog_1_48, r=flip1995
Merge rust-lang#6016