Add dyn to traits and bump Rust version

This commit is contained in:
Artur Jamro
2019-08-15 14:52:33 -07:00
committed by Dan Gohman
parent 9a57580258
commit 7009c8dd73
6 changed files with 9 additions and 9 deletions

View File

@@ -441,7 +441,7 @@ impl Instance {
}
/// Return a reference to the custom state attached to this instance.
pub fn host_state(&mut self) -> &mut Any {
pub fn host_state(&mut self) -> &mut dyn Any {
&mut *self.host_state
}
@@ -855,7 +855,7 @@ impl InstanceHandle {
}
/// Return a reference to the custom state attached to this instance.
pub fn host_state(&mut self) -> &mut Any {
pub fn host_state(&mut self) -> &mut dyn Any {
self.instance_mut().host_state()
}

View File

@@ -527,7 +527,7 @@ impl VMContext {
///
/// This is unsafe because it doesn't work on just any `VMContext`, it must
/// be a `VMContext` allocated as part of an `Instance`.
pub unsafe fn host_state(&mut self) -> &mut Any {
pub unsafe fn host_state(&mut self) -> &mut dyn Any {
self.instance().host_state()
}