Commit cb1faf8a by Paddy Horan Committed by Nick Hynes

[Rust] Fixes "common" sub crate using nightly and master (#3965)

parent 43f54a58
...@@ -97,7 +97,7 @@ pub struct TVMContext { ...@@ -97,7 +97,7 @@ pub struct TVMContext {
impl<'a> From<&'a TVMContext> for DLContext { impl<'a> From<&'a TVMContext> for DLContext {
fn from(ctx: &'a TVMContext) -> Self { fn from(ctx: &'a TVMContext) -> Self {
Self { Self {
device_type: ctx.device_type as u32, device_type: ctx.device_type as i32,
device_id: ctx.device_id as i32, device_id: ctx.device_id as i32,
} }
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
//! This crate contains the refactored basic components required //! This crate contains the refactored basic components required
//! for `runtime` and `frontend` TVM crates. //! for `runtime` and `frontend` TVM crates.
#![feature(box_syntax, type_alias_enum_variants, trait_alias)] #![feature(box_syntax, trait_alias)]
#[macro_use] #[macro_use]
extern crate failure; extern crate failure;
......
...@@ -83,7 +83,7 @@ macro_rules! TVMPODValue { ...@@ -83,7 +83,7 @@ macro_rules! TVMPODValue {
use $name::*; use $name::*;
#[allow(non_upper_case_globals)] #[allow(non_upper_case_globals)]
unsafe { unsafe {
match type_code { match type_code as i32 {
DLDataTypeCode_kDLInt => Int($value.v_int64), DLDataTypeCode_kDLInt => Int($value.v_int64),
DLDataTypeCode_kDLUInt => UInt($value.v_int64), DLDataTypeCode_kDLUInt => UInt($value.v_int64),
DLDataTypeCode_kDLFloat => Float($value.v_float64), DLDataTypeCode_kDLFloat => Float($value.v_float64),
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
//! //!
//! Checkout the `examples` repository for more details. //! Checkout the `examples` repository for more details.
#![feature(box_syntax, type_alias_enum_variants)] #![feature(box_syntax)]
#[macro_use] #[macro_use]
extern crate failure; extern crate failure;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
#![feature(bind_by_move_pattern_guards, proc_macro_span)] #![feature(proc_macro_span)]
extern crate proc_macro; extern crate proc_macro;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment