about summary refs log tree commit diff
path: root/tests/ui/issues/issue-18539.rs
blob: 66f0dabb73a250d94af4523f007aa4ea85906124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-pass
// Test that coercing bare fn's that return a zero sized type to
// a closure doesn't cause an LLVM ERROR


struct Foo;

fn uint_to_foo(_: usize) -> Foo {
    Foo
}

#[allow(unused_must_use)]
fn main() {
    (0..10).map(uint_to_foo);
}