From 5dc06b6257dd9005a0961acf48276b6bd6b8bfb2 Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Wed, 5 Sep 2018 19:20:30 +0200 Subject: [PATCH] Update for new nightly (hits rust-lang/rust#53813 on macOS though) --- Cargo.toml | 5 ----- embrio-core/Cargo.toml | 2 +- embrio-core/src/io/buf_read.rs | 2 +- embrio-core/src/io/cursor.rs | 2 +- embrio-core/src/io/read.rs | 2 +- embrio-core/src/io/void.rs | 2 +- embrio-core/src/io/write.rs | 2 +- embrio-executor/Cargo.toml | 9 +++++---- embrio-native/Cargo.toml | 2 +- embrio-native/src/io.rs | 2 +- embrio-native/src/lib.rs | 2 +- embrio-nrf51/Cargo.toml | 14 +++----------- embrio-nrf51/src/timer/timer0.rs | 2 +- embrio-nrf51/src/timer/timer1.rs | 2 +- embrio-nrf51/src/uart.rs | 2 +- embrio-util/Cargo.toml | 4 ++-- embrio-util/src/io/buf_reader.rs | 2 +- embrio-util/src/io/close.rs | 2 +- embrio-util/src/io/flush.rs | 2 +- embrio-util/src/io/read_exact.rs | 2 +- embrio-util/src/io/read_until.rs | 2 +- embrio-util/src/io/write_all.rs | 2 +- examples/apps/hello/src/lib.rs | 2 +- 23 files changed, 29 insertions(+), 41 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 84e79e9..b712604 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,3 @@ members = [ ] default-members = ["embrio"] - -# https://github.com/japaric/bare-metal/pull/10 -[patch.crates-io.bare-metal] -git = "https://github.com/Nemo157/bare-metal" -branch = "remove-old-feature" diff --git a/embrio-core/Cargo.toml b/embrio-core/Cargo.toml index 50e4c73..711d7f0 100644 --- a/embrio-core/Cargo.toml +++ b/embrio-core/Cargo.toml @@ -7,5 +7,5 @@ authors = ["Wim Looman "] edition = "2018" [dependencies.futures-core-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false diff --git a/embrio-core/src/io/buf_read.rs b/embrio-core/src/io/buf_read.rs index 8f5f865..2ed571b 100644 --- a/embrio-core/src/io/buf_read.rs +++ b/embrio-core/src/io/buf_read.rs @@ -1,4 +1,4 @@ -use core::mem::PinMut; +use core::pin::PinMut; use super::Read; diff --git a/embrio-core/src/io/cursor.rs b/embrio-core/src/io/cursor.rs index 8afa7aa..172c1ec 100644 --- a/embrio-core/src/io/cursor.rs +++ b/embrio-core/src/io/cursor.rs @@ -1,7 +1,7 @@ use core::cmp; use core::fmt; use core::marker::Unpin; -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::{task, Poll}; diff --git a/embrio-core/src/io/read.rs b/embrio-core/src/io/read.rs index de1ce7b..510b2e3 100644 --- a/embrio-core/src/io/read.rs +++ b/embrio-core/src/io/read.rs @@ -1,6 +1,6 @@ use core::cmp; use core::fmt::Debug; -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::{task, Poll}; diff --git a/embrio-core/src/io/void.rs b/embrio-core/src/io/void.rs index cec1542..1e68721 100644 --- a/embrio-core/src/io/void.rs +++ b/embrio-core/src/io/void.rs @@ -1,4 +1,4 @@ -use core::mem::PinMut; +use core::pin::PinMut; use crate::io::Write; use futures_core::{task, Poll}; diff --git a/embrio-core/src/io/write.rs b/embrio-core/src/io/write.rs index aade4ec..98804e0 100644 --- a/embrio-core/src/io/write.rs +++ b/embrio-core/src/io/write.rs @@ -1,5 +1,5 @@ use core::fmt::Debug; -use core::{cmp, mem, mem::PinMut}; +use core::{cmp, mem, pin::PinMut}; use futures_core::{task, Poll}; diff --git a/embrio-executor/Cargo.toml b/embrio-executor/Cargo.toml index 4975d25..dffde95 100644 --- a/embrio-executor/Cargo.toml +++ b/embrio-executor/Cargo.toml @@ -6,15 +6,16 @@ version = "0.1.0" authors = ["Wim Looman "] edition = "2018" -[dependencies] -pin-utils = { version = "0.1.0-alpha.1", default-features = false } +[dependencies.pin-utils] +version = "0.1.0-alpha.2" +default-features = false [dependencies.futures-core-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false [dependencies.futures-util-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false features = ["nightly"] diff --git a/embrio-native/Cargo.toml b/embrio-native/Cargo.toml index 0780f83..8a568b6 100644 --- a/embrio-native/Cargo.toml +++ b/embrio-native/Cargo.toml @@ -10,5 +10,5 @@ edition = "2018" embrio-core = { path = "../embrio-core" } [dependencies.futures-core-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false diff --git a/embrio-native/src/io.rs b/embrio-native/src/io.rs index 69b2e36..d2b499f 100644 --- a/embrio-native/src/io.rs +++ b/embrio-native/src/io.rs @@ -1,6 +1,6 @@ use std::io as stdio; use std::marker::Unpin; -use std::mem::PinMut; +use std::pin::PinMut; use embrio_core::io as embrio; use futures_core::{task, Poll}; diff --git a/embrio-native/src/lib.rs b/embrio-native/src/lib.rs index c83c06f..2a4d43a 100644 --- a/embrio-native/src/lib.rs +++ b/embrio-native/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(arbitrary_self_types, catch_expr, futures_api, pin)] +#![feature(arbitrary_self_types, futures_api, pin)] use embrio_core::io::{Read, Write}; diff --git a/embrio-nrf51/Cargo.toml b/embrio-nrf51/Cargo.toml index 73c7907..dbd16fb 100644 --- a/embrio-nrf51/Cargo.toml +++ b/embrio-nrf51/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Wim Looman "] edition = "2018" [dependencies] -cortex-m = "0.5.3" +cortex-m = "0.5.6" nrf51 = "0.5.0" [dependencies.embrio-core] @@ -17,18 +17,10 @@ path = "../embrio-core" path = "../embrio-executor" [dependencies.futures-core-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false [dependencies.futures-util-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false features = ["nightly"] - -[features] -default = [] - -# https://github.com/japaric/bare-metal/pull/10 -[patch.crates-io.bare-metal] -git = "https://github.com/Nemo157/bare-metal" -branch = "remove-old-feature" diff --git a/embrio-nrf51/src/timer/timer0.rs b/embrio-nrf51/src/timer/timer0.rs index eed19a2..0a5ecf6 100644 --- a/embrio-nrf51/src/timer/timer0.rs +++ b/embrio-nrf51/src/timer/timer0.rs @@ -1,4 +1,4 @@ -use core::{mem::PinMut, time::Duration, cell::RefCell}; +use core::{pin::PinMut, time::Duration, cell::RefCell}; use futures_core::{task::{self, Poll, Waker}, future::Future, stream::Stream}; use nrf51::{TIMER0, Interrupt}; use cortex_m::{peripheral::NVIC, interrupt::{free, Mutex}}; diff --git a/embrio-nrf51/src/timer/timer1.rs b/embrio-nrf51/src/timer/timer1.rs index 9110729..c36340e 100644 --- a/embrio-nrf51/src/timer/timer1.rs +++ b/embrio-nrf51/src/timer/timer1.rs @@ -1,4 +1,4 @@ -use core::{mem::PinMut, time::Duration, cell::RefCell}; +use core::{pin::PinMut, time::Duration, cell::RefCell}; use futures_core::{task::{self, Poll, Waker}, future::Future, stream::Stream}; use nrf51::{TIMER1, Interrupt}; use cortex_m::{peripheral::NVIC, interrupt::{free, Mutex}}; diff --git a/embrio-nrf51/src/uart.rs b/embrio-nrf51/src/uart.rs index a29a7ca..276f504 100644 --- a/embrio-nrf51/src/uart.rs +++ b/embrio-nrf51/src/uart.rs @@ -1,4 +1,4 @@ -use core::{cmp, mem::PinMut, cell::RefCell, marker::PhantomData}; +use core::{cmp, pin::PinMut, cell::RefCell, marker::PhantomData}; use futures_core::task::{self, Poll, Waker}; use embrio_core::io; use cortex_m::{peripheral::NVIC, interrupt::{free, Mutex}}; diff --git a/embrio-util/Cargo.toml b/embrio-util/Cargo.toml index d07db41..5ad938f 100644 --- a/embrio-util/Cargo.toml +++ b/embrio-util/Cargo.toml @@ -11,11 +11,11 @@ embrio-core = { path = "../embrio-core" } memchr = { version = "2.0.1", default-features = false } [dependencies.futures-core-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false [dependencies.futures-util-preview] -git = "https://github.com/rust-lang-nursery/futures-rs" +version = "0.3.0-alpha.5" default-features = false features = ["nightly"] diff --git a/embrio-util/src/io/buf_reader.rs b/embrio-util/src/io/buf_reader.rs index 9469269..865e9c3 100644 --- a/embrio-util/src/io/buf_reader.rs +++ b/embrio-util/src/io/buf_reader.rs @@ -1,4 +1,4 @@ -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::task::{self, Poll}; use futures_util::ready; diff --git a/embrio-util/src/io/close.rs b/embrio-util/src/io/close.rs index fe21ae8..77a3aa3 100644 --- a/embrio-util/src/io/close.rs +++ b/embrio-util/src/io/close.rs @@ -1,4 +1,4 @@ -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::future::Future; use futures_util::future::poll_fn; diff --git a/embrio-util/src/io/flush.rs b/embrio-util/src/io/flush.rs index 172c2bc..c09bfcf 100644 --- a/embrio-util/src/io/flush.rs +++ b/embrio-util/src/io/flush.rs @@ -1,4 +1,4 @@ -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::future::Future; use futures_util::future::poll_fn; diff --git a/embrio-util/src/io/read_exact.rs b/embrio-util/src/io/read_exact.rs index 929be8d..be72967 100644 --- a/embrio-util/src/io/read_exact.rs +++ b/embrio-util/src/io/read_exact.rs @@ -1,4 +1,4 @@ -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::future::Future; use futures_core::task::Poll; diff --git a/embrio-util/src/io/read_until.rs b/embrio-util/src/io/read_until.rs index 6bcb353..d8af9df 100644 --- a/embrio-util/src/io/read_until.rs +++ b/embrio-util/src/io/read_until.rs @@ -1,5 +1,5 @@ use core::cmp; -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::future::Future; use futures_core::task::Poll; diff --git a/embrio-util/src/io/write_all.rs b/embrio-util/src/io/write_all.rs index 5d2a06c..afa53d1 100644 --- a/embrio-util/src/io/write_all.rs +++ b/embrio-util/src/io/write_all.rs @@ -1,4 +1,4 @@ -use core::mem::PinMut; +use core::pin::PinMut; use futures_core::future::Future; use futures_core::task::Poll; diff --git a/examples/apps/hello/src/lib.rs b/examples/apps/hello/src/lib.rs index fdf31c7..3ae59b9 100644 --- a/examples/apps/hello/src/lib.rs +++ b/examples/apps/hello/src/lib.rs @@ -10,7 +10,7 @@ pin, )] -use core::{future::Future, task::{self, Poll}, ptr::NonNull, mem::PinMut, ops::{Generator, GeneratorState}, cell::UnsafeCell}; +use core::{future::Future, task::{self, Poll}, ptr::NonNull, pin::PinMut, ops::{Generator, GeneratorState}, cell::UnsafeCell}; use embrio::io::{self, Read, Write, BufReader}; use pin_utils::pin_mut;