avoid bare trait objects

master
Ralf Jung 2019-07-13 11:07:43 +02:00
parent 5e06435c29
commit 65dacd7150
1 changed files with 2 additions and 2 deletions

View File

@ -350,8 +350,8 @@ fn run() {
// } // }
} }
fn something_with_a_dtor(f: &Fn()) { fn something_with_a_dtor(f: &dyn Fn()) {
struct A<'a>(&'a (Fn() + 'a)); struct A<'a>(&'a (dyn Fn() + 'a));
impl<'a> Drop for A<'a> { impl<'a> Drop for A<'a> {
fn drop(&mut self) { fn drop(&mut self) {