mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
16 lines
296 B
Rust
16 lines
296 B
Rust
struct Foo<T: Clone>(T);
|
|
|
|
use std::ops::Add;
|
|
|
|
impl<T: Clone, Add> Add for Foo<T> {
|
|
//~^ ERROR expected trait, found type parameter
|
|
type Output = usize;
|
|
|
|
fn add(self, rhs: Self) -> Self::Output {
|
|
//~^ ERROR ambiguous associated type
|
|
unimplemented!();
|
|
}
|
|
}
|
|
|
|
fn main() {}
|