Skip to content

Commit

Permalink
[Rust] Fixes "common" sub crate using nightly and master (apache#3965)
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyhoran authored and wweic committed Sep 30, 2019
1 parent c2f47e7 commit 1f706b2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust/common/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down
2 changes: 1 addition & 1 deletion rust/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion rust/common/src/packed_func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion rust/frontend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion rust/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

#![feature(bind_by_move_pattern_guards, proc_macro_span)]
#![feature(proc_macro_span)]

extern crate proc_macro;

Expand Down

0 comments on commit 1f706b2

Please sign in to comment.