782b484b79
rustc comiler internals helpfully tell us how to fix the issue: to get the signature of a closure, use `substs.as_closure().sig()` not `fn_sig()` Fixes ICE in #9041
9 lines
198 B
Rust
9 lines
198 B
Rust
pub struct Thing;
|
|
|
|
pub fn has_thing(things: &[Thing]) -> bool {
|
|
let is_thing_ready = |_peer: &Thing| -> bool { todo!() };
|
|
things.iter().find(|p| is_thing_ready(p)).is_some()
|
|
}
|
|
|
|
fn main() {}
|