mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
11 lines
243 B
Rust
11 lines
243 B
Rust
//@ run-pass
|
|
fn works<T>(x: T) -> Vec<T> { vec![x] }
|
|
|
|
fn also_works<T: Clone>(x: T) -> Vec<T> { vec![x] }
|
|
|
|
fn main() {
|
|
let _: Vec<usize> = works(0);
|
|
let _: Vec<usize> = also_works(0);
|
|
let _ = works(0);
|
|
let _ = also_works(0);
|
|
}
|