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