]>
Commit | Line | Data |
---|---|---|
1 | // run-pass | |
2 | // Test that coercing bare fn's that return a zero sized type to | |
3 | // a closure doesn't cause an LLVM ERROR | |
4 | ||
5 | // pretty-expanded FIXME #23616 | |
6 | ||
7 | struct Foo; | |
8 | ||
9 | fn uint_to_foo(_: usize) -> Foo { | |
10 | Foo | |
11 | } | |
12 | ||
13 | #[allow(unused_must_use)] | |
14 | fn main() { | |
15 | (0..10).map(uint_to_foo); | |
16 | } |