]> git.proxmox.com Git - rustc.git/blame - src/test/run-pass/issues/issue-18539.rs
New upstream version 1.37.0+dfsg1
[rustc.git] / src / test / run-pass / issues / issue-18539.rs
CommitLineData
b7449926 1// run-pass
1a4d82fc
JJ
2// Test that coercing bare fn's that return a zero sized type to
3// a closure doesn't cause an LLVM ERROR
223e47cc 4
c34b1796
AL
5// pretty-expanded FIXME #23616
6
1a4d82fc 7struct Foo;
223e47cc 8
c34b1796 9fn uint_to_foo(_: usize) -> Foo {
1a4d82fc 10 Foo
223e47cc
LB
11}
12
1a4d82fc 13#[allow(unused_must_use)]
223e47cc 14fn main() {
c34b1796 15 (0..10).map(uint_to_foo);
223e47cc 16}