15 lines
207 B
Rust
15 lines
207 B
Rust
|
use std::ops::Add;
|
||
|
|
||
|
fn dbl<T>(x: T) -> <T as Add>::Output
|
||
|
where
|
||
|
T: Copy + Add,
|
||
|
UUU: Copy,
|
||
|
//~^ ERROR cannot find type `UUU` in this scope
|
||
|
{
|
||
|
x + x
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
println!("{}", dbl(3));
|
||
|
}
|