Rollup merge of #53781 - matthiaskrgr:fix_any_bench, r=kennytm

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

fixes
````
error: trait objects without an explicit `dyn` are deprecated
  --> libcore/../libcore/benches/any.rs:18:36
   |
18 |         let mut y = &mut x as &mut Any;
   |                                    ^^^ help: use `dyn`: `dyn Any`
   |
   = note: requested on the command line with `-D bare-trait-objects`
````
This commit is contained in:
kennytm 2018-09-01 21:14:11 +08:00 committed by GitHub
commit 8d161a6682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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