]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-18539.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-18539.rs
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 }