blob: a7a20bad51750d573e98f139682d1dd0213c0345 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// 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);
}
|