bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")

This commit is contained in:
Matthias Krüger 2018-08-29 12:18:05 +02:00
parent f4e981cfe4
commit 50057ee3a3

View file

@ -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));
});