Skip to content

Commit cb1faf8

Browse files
paddyhorannhynes
authored andcommitted
[Rust] Fixes "common" sub crate using nightly and master (#3965)
1 parent 43f54a5 commit cb1faf8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

rust/common/src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub struct TVMContext {
9797
impl<'a> From<&'a TVMContext> for DLContext {
9898
fn from(ctx: &'a TVMContext) -> Self {
9999
Self {
100-
device_type: ctx.device_type as u32,
100+
device_type: ctx.device_type as i32,
101101
device_id: ctx.device_id as i32,
102102
}
103103
}

rust/common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! This crate contains the refactored basic components required
2121
//! for `runtime` and `frontend` TVM crates.
2222
23-
#![feature(box_syntax, type_alias_enum_variants, trait_alias)]
23+
#![feature(box_syntax, trait_alias)]
2424

2525
#[macro_use]
2626
extern crate failure;

rust/common/src/packed_func.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ macro_rules! TVMPODValue {
8383
use $name::*;
8484
#[allow(non_upper_case_globals)]
8585
unsafe {
86-
match type_code {
86+
match type_code as i32 {
8787
DLDataTypeCode_kDLInt => Int($value.v_int64),
8888
DLDataTypeCode_kDLUInt => UInt($value.v_int64),
8989
DLDataTypeCode_kDLFloat => Float($value.v_float64),

rust/frontend/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//!
3131
//! Checkout the `examples` repository for more details.
3232
33-
#![feature(box_syntax, type_alias_enum_variants)]
33+
#![feature(box_syntax)]
3434

3535
#[macro_use]
3636
extern crate failure;

rust/macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
#![feature(bind_by_move_pattern_guards, proc_macro_span)]
20+
#![feature(proc_macro_span)]
2121

2222
extern crate proc_macro;
2323

0 commit comments

Comments
 (0)