2018-08-30 12:18:55 +00:00
|
|
|
// run-pass
|
2015-07-20 16:59:33 +00:00
|
|
|
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);
|
|
|
|
}
|