]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-12909.rs
Enable full revision in const generics ui tests
[rust.git] / src / test / ui / issues / issue-12909.rs
1 // run-pass
2 #![allow(unused_variables)]
3 // pretty-expanded FIXME #23616
4
5 use std::collections::HashMap;
6
7 fn copy<T: Copy>(&x: &T) -> T {
8     x
9 }
10
11 fn main() {
12     let arr = [(1, 1), (2, 2), (3, 3)];
13
14     let v1: Vec<&_> = arr.iter().collect();
15     let v2: Vec<_> = arr.iter().map(copy).collect();
16
17     let m1: HashMap<_, _> = arr.iter().map(copy).collect();
18     let m2: HashMap<isize, _> = arr.iter().map(copy).collect();
19     let m3: HashMap<_, usize> = arr.iter().map(copy).collect();
20 }