Skip to content

Commit

Permalink
Merge pull request rust-lang#142 from ville-h/28946
Browse files Browse the repository at this point in the history
28946
  • Loading branch information
steveklabnik committed Nov 6, 2015
2 parents 98fe94f + f950007 commit f3f9b04
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/28946.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub trait Dot<Other=Self> {
type Output;

fn dot(self, rhs: Other) -> Self::Output;
}


impl<'a, T, U> Dot<&'a U> for T where T: Dot<U>, U: Copy {
type Output = T::Output;

fn dot(self, rhs: &U) -> Self::Output {
self.dot(*rhs)
}
}

0 comments on commit f3f9b04

Please sign in to comment.