2016-10-26 22:51:49 -05:00
|
|
|
struct Foo<T: Clone>(T);
|
|
|
|
|
|
|
|
use std::ops::Add;
|
|
|
|
|
|
|
|
impl<T: Clone, Add> Add for Foo<T> {
|
2017-11-20 06:13:27 -06:00
|
|
|
//~^ ERROR expected trait, found type parameter
|
2016-10-26 22:51:49 -05:00
|
|
|
type Output = usize;
|
|
|
|
|
|
|
|
fn add(self, rhs: Self) -> Self::Output {
|
2024-02-23 05:45:44 -06:00
|
|
|
//~^ ERROR ambiguous associated type
|
2016-10-26 22:51:49 -05:00
|
|
|
unimplemented!();
|
|
|
|
}
|
|
|
|
}
|
2018-03-12 15:21:43 -05:00
|
|
|
|
|
|
|
fn main() {}
|