about summary refs log tree commit diff
path: root/tests/ui/closures/missing-body.rs
blob: 461c2be3ccd7f29e5f524ca2e913ddd8a8ab063b (plain)
1
2
3
4
5
6
7
// Checks that the compiler complains about the missing closure body and does not
// crash.
// This is a regression test for <https://github.com/rust-lang/rust/issues/143128>.

fn main() { |b: [str; _]| {}; }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for closures
//~| ERROR the size for values of type `str` cannot be known at compilation time