use assoc types in binop traits

This commit is contained in:
Jorge Aparicio 2014-12-31 15:45:13 -05:00
parent 7095dd0070
commit 99017f82b6
36 changed files with 375 additions and 156 deletions

View file

@ -911,7 +911,9 @@ impl<'a, S: Str> Equiv<S> for String {
}
#[experimental = "waiting on Add stabilization"]
impl<'a> Add<&'a str, String> for String {
impl<'a> Add<&'a str> for String {
type Output = String;
fn add(mut self, other: &str) -> String {
self.push_str(other);
self