Skip to content

Commit

Permalink
bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Aug 29, 2018
1 parent f4e981c commit 50057ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/benches/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use test::{Bencher, black_box};
fn bench_downcast_ref(b: &mut Bencher) {
b.iter(|| {
let mut x = 0;
let mut y = &mut x as &mut Any;
let mut y = &mut x as &mut dyn Any;
black_box(&mut y);
black_box(y.downcast_ref::<isize>() == Some(&0));
});
Expand Down

0 comments on commit 50057ee

Please sign in to comment.