From e015bc0856bed4004119938c2a80294408d1e305 Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 20 May 2021 11:45:41 +0200 Subject: [PATCH] build(core/rust): disable nightly-only features When we need them, we will re-enable. --- core/embed/rust/Cargo.lock | 14 -------------- core/embed/rust/Cargo.toml | 4 ---- core/embed/rust/rust-toolchain | 2 -- core/embed/rust/src/lib.rs | 4 ---- core/embed/rust/src/micropython/gc.rs | 6 +----- 5 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 core/embed/rust/rust-toolchain diff --git a/core/embed/rust/Cargo.lock b/core/embed/rust/Cargo.lock index 0e4653490..52dab30ba 100644 --- a/core/embed/rust/Cargo.lock +++ b/core/embed/rust/Cargo.lock @@ -60,12 +60,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" -[[package]] -name = "cc" -version = "1.0.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" - [[package]] name = "cexpr" version = "0.4.0" @@ -270,12 +264,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d" -[[package]] -name = "staticvec" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f4be0fd89694157f3814ca88715ad8ba6010c453b1e89ca264aee04d70b9" - [[package]] name = "strsim" version = "0.8.0" @@ -314,10 +302,8 @@ name = "trezor_lib" version = "0.1.0" dependencies = [ "bindgen", - "cc", "cstr_core", "cty", - "staticvec", ] [[package]] diff --git a/core/embed/rust/Cargo.toml b/core/embed/rust/Cargo.toml index f2c7f11cc..c34cf3955 100644 --- a/core/embed/rust/Cargo.toml +++ b/core/embed/rust/Cargo.toml @@ -22,10 +22,6 @@ codegen-units = 1 [dependencies] cty = "0.2.1" -[dependencies.staticvec] -version = "0.10.5" -default_features = false - [dependencies.cstr_core] version = "0.2.2" default_features = false diff --git a/core/embed/rust/rust-toolchain b/core/embed/rust/rust-toolchain deleted file mode 100644 index c1a4c6bb4..000000000 --- a/core/embed/rust/rust-toolchain +++ /dev/null @@ -1,2 +0,0 @@ -nightly - diff --git a/core/embed/rust/src/lib.rs b/core/embed/rust/src/lib.rs index ae28ac1b6..93de520a5 100644 --- a/core/embed/rust/src/lib.rs +++ b/core/embed/rust/src/lib.rs @@ -1,8 +1,4 @@ #![cfg_attr(not(test), no_std)] -#![feature(never_type)] -#![feature(unsize)] -#![feature(coerce_unsized)] -#![feature(dispatch_from_dyn)] #![deny(clippy::all)] #![deny(unsafe_op_in_unsafe_fn)] #![allow(dead_code)] diff --git a/core/embed/rust/src/micropython/gc.rs b/core/embed/rust/src/micropython/gc.rs index e4f6ece9d..5e5c9de19 100644 --- a/core/embed/rust/src/micropython/gc.rs +++ b/core/embed/rust/src/micropython/gc.rs @@ -1,7 +1,6 @@ use core::{ alloc::Layout, - marker::Unsize, - ops::{CoerceUnsized, Deref, DispatchFromDyn}, + ops::Deref, ptr::{self, NonNull}, }; @@ -13,9 +12,6 @@ use super::ffi; /// `Copy` and `Clone`, we avoid doing this until proven necessary. pub struct Gc(NonNull); -impl, U: ?Sized> CoerceUnsized> for Gc {} -impl, U: ?Sized> DispatchFromDyn> for Gc {} - impl Gc { /// Allocate memory on the heap managed by the MicroPython garbage collector /// and then place `v` into it. `v` will _not_ get its destructor called.