Unsupported closure + dyn
Closed this issue · 1 comments
ranjitjhala commented
Via @enjhnsn2
I found a minimized example that triggers the error. Unfortunately its a little more complicated:
pub trait Animal {
fn noise(&self);
}
fn apply_closure_to_animal<F>(closure: F, animal: &'static dyn Animal)
where
F: FnOnce(&dyn Animal),
{
closure(animal);
}
This bug isn't too frequent and is possible to work around, so I don't think you should block this pr on it.
Originally posted by @enjhnsn2 in #664 (comment)
ranjitjhala commented