diff options
| author | kennytm <kennytm@gmail.com> | 2018-09-01 21:14:11 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-01 21:14:11 +0800 |
| commit | 8d161a668214e409114761427b540549d775b4fa (patch) | |
| tree | 68cce4685e2aed79cc834674198ddbe488062c23 | |
| parent | 2e543e9439c817f3af02170525a7dc9a26e3a307 (diff) | |
| parent | 50057ee3a364d51f5dee611ebd1fd3a05ac77ff5 (diff) | |
| download | rust-8d161a668214e409114761427b540549d775b4fa.tar.gz rust-8d161a668214e409114761427b540549d775b4fa.zip | |
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` ````
| -rw-r--r-- | src/libcore/benches/any.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/benches/any.rs b/src/libcore/benches/any.rs index 67e02cf9509..f4f01eb1cf5 100644 --- a/src/libcore/benches/any.rs +++ b/src/libcore/benches/any.rs @@ -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)); }); |
