bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")
This commit is contained in:
parent
f4e981cfe4
commit
50057ee3a3
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue