Sign in
◑
Theme
rust
/
rust
/
dea89f8ca811f966e7675227dfdcd04bdbe59f4a
/
.
/
tests
/
ui
/
typeck
/
call-unit-struct-as-fn.rs
blob: 2fe2085dd72a97596a7029e07f65625e85e4eb2d [
file
]
//! Regression test for <https://github.com/rust-lang/rust/issues/46771>.
//! Test calling unit struct as fn doesn't ICE.
fn
main
()
{
struct
Foo
;
(
1
..
2
).
find
(|
_
|
Foo
(
0
)
==
0
);
//~ ERROR expected function, found `Foo`
}