rust/src/test/run-pass/issues/issue-10436.rs
2018-12-25 21:08:33 -07:00

12 lines
242 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);
}