Skip to content

Commit

Permalink
Merge pull request #301 from RalfJung/dyn
Browse files Browse the repository at this point in the history
avoid bare trait objects
  • Loading branch information
alexcrichton authored Jul 15, 2019
2 parents 18f2d2d + 65dacd7 commit 56f5b5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ fn run() {
// }
}

fn something_with_a_dtor(f: &Fn()) {
struct A<'a>(&'a (Fn() + 'a));
fn something_with_a_dtor(f: &dyn Fn()) {
struct A<'a>(&'a (dyn Fn() + 'a));

impl<'a> Drop for A<'a> {
fn drop(&mut self) {
Expand Down

0 comments on commit 56f5b5d

Please sign in to comment.