[Rust] Fixes "common" sub crate using nightly and master (#3965)
authorPaddy Horan <paddyhoran@hotmail.com>
Sun, 22 Sep 2019 23:13:07 +0000 (19:13 -0400)
committerNick Hynes <nhynes@oasislabs.com>
Sun, 22 Sep 2019 23:13:07 +0000 (16:13 -0700)
rust/common/src/array.rs
rust/common/src/lib.rs
rust/common/src/packed_func.rs
rust/frontend/src/lib.rs
rust/macros/src/lib.rs

index 4ccfb4b..5cc8cc2 100644 (file)
@@ -97,7 +97,7 @@ pub struct TVMContext {
 impl<'a> From<&'a TVMContext> for DLContext {
     fn from(ctx: &'a TVMContext) -> Self {
         Self {
-            device_type: ctx.device_type as u32,
+            device_type: ctx.device_type as i32,
             device_id: ctx.device_id as i32,
         }
     }
index c928658..b1362ae 100644 (file)
@@ -20,7 +20,7 @@
 //! This crate contains the refactored basic components required
 //! for `runtime` and `frontend` TVM crates.
 
-#![feature(box_syntax, type_alias_enum_variants, trait_alias)]
+#![feature(box_syntax, trait_alias)]
 
 #[macro_use]
 extern crate failure;
index c75e902..0f3c775 100644 (file)
@@ -83,7 +83,7 @@ macro_rules! TVMPODValue {
                 use $name::*;
                 #[allow(non_upper_case_globals)]
                 unsafe {
-                    match type_code {
+                    match type_code as i32 {
                         DLDataTypeCode_kDLInt => Int($value.v_int64),
                         DLDataTypeCode_kDLUInt => UInt($value.v_int64),
                         DLDataTypeCode_kDLFloat => Float($value.v_float64),
index adb258d..9bf982e 100644 (file)
@@ -30,7 +30,7 @@
 //!
 //! Checkout the `examples` repository for more details.
 
-#![feature(box_syntax, type_alias_enum_variants)]
+#![feature(box_syntax)]
 
 #[macro_use]
 extern crate failure;
index 704f7c1..f6b1afd 100644 (file)
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-#![feature(bind_by_move_pattern_guards, proc_macro_span)]
+#![feature(proc_macro_span)]
 
 extern crate proc_macro;