mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
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));
|
|
}
|