aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml25
-rw-r--r--Xargo.toml5
-rw-r--r--ci/install.sh4
-rw-r--r--examples/custom-type.rs1
-rw-r--r--examples/full-syntax.rs3
-rw-r--r--examples/generics.rs3
-rw-r--r--examples/late-resources.rs1
-rw-r--r--examples/nested.rs13
-rw-r--r--examples/one-task.rs1
-rw-r--r--examples/preemption.rs1
-rw-r--r--examples/safe-static-mut-ref.rs1
-rw-r--r--examples/two-tasks.rs1
-rw-r--r--examples/zero-tasks.rs2
-rw-r--r--macros/Cargo.toml8
-rw-r--r--macros/src/check.rs2
-rw-r--r--macros/src/lib.rs1
-rw-r--r--macros/src/trans.rs37
-rw-r--r--src/examples/_0_zero_tasks.rs2
-rw-r--r--src/examples/_1_one_task.rs1
-rw-r--r--src/examples/_2_two_tasks.rs1
-rw-r--r--src/examples/_3_preemption.rs1
-rw-r--r--src/examples/_4_nested.rs12
-rw-r--r--src/examples/_5_late_resources.rs1
-rw-r--r--src/examples/_6_safe_static_mut_ref.rs1
-rw-r--r--src/examples/_7_generics.rs3
-rw-r--r--src/examples/_8_full_syntax.rs3
-rw-r--r--src/lib.rs1
-rw-r--r--tests/cfail/critical-section.rs1
-rw-r--r--tests/cfail/duplicated-task.rs1
-rw-r--r--tests/cfail/exception.rs1
-rw-r--r--tests/cfail/idle.rs1
-rw-r--r--tests/cfail/init-resource-share-idle.rs1
-rw-r--r--tests/cfail/init-resource-share-task.rs1
-rw-r--r--tests/cfail/init.rs1
-rw-r--r--tests/cfail/interrupt.rs1
-rw-r--r--tests/cfail/late-resource-init.rs1
-rw-r--r--tests/cfail/lock.rs1
-rw-r--r--tests/cfail/peripheral-alias.rs1
-rw-r--r--tests/cfail/priority-too-high.rs6
-rw-r--r--tests/cfail/priority-too-low.rs6
-rw-r--r--tests/cfail/resource-alias.rs1
-rw-r--r--tests/cfail/resource-not-send-sync.rs3
-rw-r--r--tests/cfail/token-outlive.rs1
-rw-r--r--tests/cfail/token-transfer.rs3
-rw-r--r--tests/cfail/wrong-threshold.rs1
45 files changed, 56 insertions, 111 deletions
diff --git a/.travis.yml b/.travis.yml
index 7c6bff4..8e8aafb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,44 +7,21 @@ matrix:
- env: TARGET=thumbv6m-none-eabi
rust: nightly
- addons:
- apt:
- sources:
- - debian-sid
- packages:
- - binutils-arm-none-eabi
- env: TARGET=thumbv7m-none-eabi
rust: nightly
- addons:
- apt:
- sources:
- - debian-sid
- packages:
- - binutils-arm-none-eabi
- env: TARGET=thumbv7em-none-eabi
rust: nightly
- addons:
- apt:
- sources:
- - debian-sid
- packages:
- - binutils-arm-none-eabi
- env: TARGET=thumbv7em-none-eabihf
rust: nightly
- addons:
- apt:
- sources:
- - debian-sid
- packages:
- - binutils-arm-none-eabi
before_install: set -e
install:
- bash ci/install.sh
+ - export PATH="$PATH:$PWD/gcc/bin"
script:
- bash ci/script.sh
diff --git a/Xargo.toml b/Xargo.toml
deleted file mode 100644
index bd7ffe0..0000000
--- a/Xargo.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-[dependencies.core]
-stage = 0
-
-[dependencies.compiler_builtins]
-stage = 1 \ No newline at end of file
diff --git a/ci/install.sh b/ci/install.sh
index 3c41921..e63e805 100644
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -4,6 +4,10 @@ main() {
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
rustup target add $TARGET
fi
+
+ mkdir gcc
+
+ curl -L https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2?revision=bc2c96c0-14b5-4bb4-9f18-bceb4050fee7?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,7-2018-q2-update | tar --strip-components=1 -C gcc -xj
}
main
diff --git a/examples/custom-type.rs b/examples/custom-type.rs
index 79d6cc4..826e9dd 100644
--- a/examples/custom-type.rs
+++ b/examples/custom-type.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/examples/full-syntax.rs b/examples/full-syntax.rs
index 5b27412..9bdcd7b 100644
--- a/examples/full-syntax.rs
+++ b/examples/full-syntax.rs
@@ -1,7 +1,6 @@
//! A showcase of the `app!` macro syntax
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
@@ -60,7 +59,7 @@ mod main {
pub fn idle(t: &mut Threshold, mut r: ::idle::Resources) -> ! {
loop {
- *r.OWNED != *r.OWNED;
+ *r.OWNED = !*r.OWNED;
if *r.OWNED {
if r.SHARED.claim(t, |shared, _| *shared) {
diff --git a/examples/generics.rs b/examples/generics.rs
index ca7726d..aceba1a 100644
--- a/examples/generics.rs
+++ b/examples/generics.rs
@@ -1,14 +1,13 @@
//! Working with resources in a generic fashion
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
extern crate stm32f103xx;
use rtfm::{app, Resource, Threshold};
-use stm32f103xx::{SPI1, GPIOA};
+use stm32f103xx::{GPIOA, SPI1};
app! {
device: stm32f103xx,
diff --git a/examples/late-resources.rs b/examples/late-resources.rs
index 07c321f..3bfc388 100644
--- a/examples/late-resources.rs
+++ b/examples/late-resources.rs
@@ -1,7 +1,6 @@
//! Demonstrates initialization of resources in `init`.
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/examples/nested.rs b/examples/nested.rs
index 6af7087..46c00b2 100644
--- a/examples/nested.rs
+++ b/examples/nested.rs
@@ -4,7 +4,6 @@
//! letters in the comments: A, then B, then C, etc.
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
@@ -60,7 +59,13 @@ fn idle() -> ! {
}
#[allow(non_snake_case)]
-fn exti0(t: &mut Threshold, EXTI0::Resources { mut LOW, mut HIGH }: EXTI0::Resources) {
+fn exti0(
+ t: &mut Threshold,
+ EXTI0::Resources {
+ LOW: mut low,
+ HIGH: mut high,
+ }: EXTI0::Resources,
+) {
// Because this task has a priority of 1 the preemption threshold `t` also
// starts at 1
@@ -71,7 +76,7 @@ fn exti0(t: &mut Threshold, EXTI0::Resources { mut LOW, mut HIGH }: EXTI0::Resou
rtfm::set_pending(Interrupt::EXTI1); // ~> exti1
// A claim creates a critical section
- LOW.claim_mut(t, |_low, t| {
+ low.claim_mut(t, |_low, t| {
// This claim increases the preemption threshold to 2
//
// 2 is just high enough to not race with task `exti1` for access to the
@@ -92,7 +97,7 @@ fn exti0(t: &mut Threshold, EXTI0::Resources { mut LOW, mut HIGH }: EXTI0::Resou
rtfm::bkpt();
// Claims can be nested
- HIGH.claim_mut(t, |_high, _| {
+ high.claim_mut(t, |_high, _| {
// This claim increases the preemption threshold to 3
// Now `exti2` can't preempt this task
diff --git a/examples/one-task.rs b/examples/one-task.rs
index c62fbbf..dc2bfd2 100644
--- a/examples/one-task.rs
+++ b/examples/one-task.rs
@@ -1,7 +1,6 @@
//! An application with one task
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m;
diff --git a/examples/preemption.rs b/examples/preemption.rs
index 8e50188..340b976 100644
--- a/examples/preemption.rs
+++ b/examples/preemption.rs
@@ -1,7 +1,6 @@
//! Two tasks running at *different* priorities with access to the same resource
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/examples/safe-static-mut-ref.rs b/examples/safe-static-mut-ref.rs
index 81dbde2..9579f52 100644
--- a/examples/safe-static-mut-ref.rs
+++ b/examples/safe-static-mut-ref.rs
@@ -1,7 +1,6 @@
//! Safe creation of `&'static mut` references
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/examples/two-tasks.rs b/examples/two-tasks.rs
index 4f567f0..2348915 100644
--- a/examples/two-tasks.rs
+++ b/examples/two-tasks.rs
@@ -1,7 +1,6 @@
//! Two tasks running at the *same* priority with access to the same resource
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/examples/zero-tasks.rs b/examples/zero-tasks.rs
index b1ebab6..abd1c4c 100644
--- a/examples/zero-tasks.rs
+++ b/examples/zero-tasks.rs
@@ -1,8 +1,6 @@
//! Minimal example with zero tasks
#![deny(unsafe_code)]
#![deny(warnings)]
-// IMPORTANT always include this feature gate
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm; // IMPORTANT always do this rename
diff --git a/macros/Cargo.toml b/macros/Cargo.toml
index d36499e..794b30b 100644
--- a/macros/Cargo.toml
+++ b/macros/Cargo.toml
@@ -11,10 +11,10 @@ version = "0.3.1"
[dependencies]
failure = "0.1.1"
-proc-macro2 = "0.3.6"
-quote = "0.5.1"
-rtfm-syntax = "0.3.0"
-syn = "0.13.1"
+proc-macro2 = "0.4.6"
+quote = "0.6.3"
+rtfm-syntax = "0.3.4"
+syn = "0.14.2"
[lib]
proc-macro = true
diff --git a/macros/src/check.rs b/macros/src/check.rs
index 4defb46..b81fc4d 100644
--- a/macros/src/check.rs
+++ b/macros/src/check.rs
@@ -61,7 +61,7 @@ pub fn app(app: check::App) -> Result<App> {
tasks: app.tasks
.into_iter()
.map(|(k, v)| {
- let v = ::check::task(k.as_ref(), v)?;
+ let v = ::check::task(&k.to_string(), v)?;
Ok((k, v))
})
diff --git a/macros/src/lib.rs b/macros/src/lib.rs
index 728e613..65d5ad8 100644
--- a/macros/src/lib.rs
+++ b/macros/src/lib.rs
@@ -1,6 +1,5 @@
//! Procedural macros of the `cortex-m-rtfm` crate
// #![deny(warnings)]
-#![feature(proc_macro)]
#![recursion_limit = "128"]
#[macro_use]
diff --git a/macros/src/trans.rs b/macros/src/trans.rs
index 964b1a3..dcd6cfb 100644
--- a/macros/src/trans.rs
+++ b/macros/src/trans.rs
@@ -1,15 +1,14 @@
-use proc_macro2::Span;
-use quote::Tokens;
+use proc_macro2::{TokenStream, Span};
use syn::{Ident, LitStr};
use analyze::Ownerships;
use check::{App, Kind};
fn krate() -> Ident {
- Ident::from("rtfm")
+ Ident::new("rtfm", Span::call_site())
}
-pub fn app(app: &App, ownerships: &Ownerships) -> Tokens {
+pub fn app(app: &App, ownerships: &Ownerships) -> TokenStream {
let mut root = vec![];
let mut main = vec![quote!(#![allow(path_statements)])];
@@ -28,7 +27,7 @@ pub fn app(app: &App, ownerships: &Ownerships) -> Tokens {
quote!(#(#root)*)
}
-fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) {
+fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<TokenStream>, root: &mut Vec<TokenStream>) {
let krate = krate();
let mut mod_items = vec![];
@@ -54,7 +53,7 @@ fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<Tokens>, root: &mut V
let super_ = if needs_reexport {
None
} else {
- Some(Ident::from("super"))
+ Some(Ident::new("super", Span::call_site()))
};
let mut rexprs = vec![];
let mut rfields = vec![];
@@ -70,7 +69,7 @@ fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<Tokens>, root: &mut V
pub #name: &'static mut #ty,
});
- let _name = Ident::from(format!("_{}", name.as_ref()));
+ let _name = Ident::new(&name.to_string(), Span::call_site());
rexprs.push(if resource.expr.is_some() {
quote! {
#name: &mut #super_::#_name,
@@ -86,7 +85,7 @@ fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<Tokens>, root: &mut V
});
rexprs.push(quote! {
- #name: ::idle::#name { _0: core::marker::PhantomData },
+ #name: ::idle::#name { _0: ::core::marker::PhantomData },
});
}
}
@@ -136,7 +135,7 @@ fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<Tokens>, root: &mut V
continue;
}
- let _name = Ident::from(format!("_{}", name.as_ref()));
+ let _name = Ident::new(&name.to_string(), Span::call_site());
let resource = app.resources
.get(name)
.expect(&format!("BUG: resource {} has no definition", name));
@@ -150,7 +149,7 @@ fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<Tokens>, root: &mut V
mod_items.push(quote! {
#[allow(non_camel_case_types)]
- pub struct #name { _0: core::marker::PhantomData<*const ()> }
+ pub struct #name { _0: ::core::marker::PhantomData<*const ()> }
});
root.push(quote! {
@@ -224,7 +223,7 @@ fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec<Tokens>, root: &mut V
});
}
-fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) {
+fn init(app: &App, main: &mut Vec<TokenStream>, root: &mut Vec<TokenStream>) {
let device = &app.device;
let krate = krate();
@@ -263,7 +262,7 @@ fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) {
&mut #name
},));
} else {
- let _name = Ident::from(format!("_{}", name.as_ref()));
+ let _name = Ident::new(&name.to_string(), Span::call_site());
lifetime = Some(quote!('a));
fields.push(quote! {
@@ -310,7 +309,7 @@ fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) {
let mut fields = vec![];
for (name, resource) in late_resources {
- let _name = Ident::from(format!("_{}", name.as_ref()));
+ let _name = Ident::new(&name.to_string(), Span::call_site());
let ty = &resource.ty;
@@ -415,11 +414,11 @@ fn init(app: &App, main: &mut Vec<Tokens>, root: &mut Vec<Tokens>) {
});
}
-fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>) {
+fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec<TokenStream>) {
let krate = krate();
for name in ownerships.keys() {
- let _name = Ident::from(format!("_{}", name.as_ref()));
+ let _name = Ident::new(&name.to_string(), Span::call_site());
// Declare the static that holds the resource
let resource = app.resources
@@ -442,7 +441,7 @@ fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>) {
}
}
-fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>, main: &mut Vec<Tokens>) {
+fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec<TokenStream>, main: &mut Vec<TokenStream>) {
let device = &app.device;
let krate = krate();
@@ -456,7 +455,7 @@ fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>, main: &mut
if has_resources {
for rname in &task.resources {
let ceiling = ownerships[rname].ceiling();
- let _rname = Ident::from(format!("_{}", rname.as_ref()));
+ let _rname = Ident::new(&rname.to_string(), Span::call_site());
let resource = app.resources
.get(rname)
.expect(&format!("BUG: resource {} has no definition", rname));
@@ -594,8 +593,8 @@ fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>, main: &mut
}
let path = &task.path;
- let _tname = Ident::from(format!("_{}", tname));
- let export_name = LitStr::new(tname.as_ref(), Span::call_site());
+ let _tname = Ident::new(&tname.to_string(), Span::call_site());
+ let export_name = LitStr::new(&tname.to_string(), Span::call_site());
root.push(quote! {
#[allow(non_snake_case)]
#[allow(unsafe_code)]
diff --git a/src/examples/_0_zero_tasks.rs b/src/examples/_0_zero_tasks.rs
index 90f16d4..0484bb9 100644
--- a/src/examples/_0_zero_tasks.rs
+++ b/src/examples/_0_zero_tasks.rs
@@ -3,8 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! // IMPORTANT always include this feature gate
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm; // IMPORTANT always do this rename
diff --git a/src/examples/_1_one_task.rs b/src/examples/_1_one_task.rs
index c9004e8..b9075a5 100644
--- a/src/examples/_1_one_task.rs
+++ b/src/examples/_1_one_task.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m;
diff --git a/src/examples/_2_two_tasks.rs b/src/examples/_2_two_tasks.rs
index cf6b33d..516ff0c 100644
--- a/src/examples/_2_two_tasks.rs
+++ b/src/examples/_2_two_tasks.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_3_preemption.rs b/src/examples/_3_preemption.rs
index 4360185..14c9d92 100644
--- a/src/examples/_3_preemption.rs
+++ b/src/examples/_3_preemption.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_4_nested.rs b/src/examples/_4_nested.rs
index e211cf8..26f8fd8 100644
--- a/src/examples/_4_nested.rs
+++ b/src/examples/_4_nested.rs
@@ -6,14 +6,13 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
//! extern crate stm32f103xx;
//!
-//! use stm32f103xx::Interrupt;
//! use rtfm::{app, Resource, Threshold};
+//! use stm32f103xx::Interrupt;
//!
//! app! {
//! device: stm32f103xx,
@@ -64,7 +63,10 @@
//! #[allow(non_snake_case)]
//! fn exti0(
//! t: &mut Threshold,
-//! EXTI0::Resources { mut LOW, mut HIGH }: EXTI0::Resources,
+//! EXTI0::Resources {
+//! LOW: mut low,
+//! HIGH: mut high,
+//! }: EXTI0::Resources,
//! ) {
//! // Because this task has a priority of 1 the preemption threshold `t` also
//! // starts at 1
@@ -76,7 +78,7 @@
//! rtfm::set_pending(Interrupt::EXTI1); // ~> exti1
//!
//! // A claim creates a critical section
-//! LOW.claim_mut(t, |_low, t| {
+//! low.claim_mut(t, |_low, t| {
//! // This claim increases the preemption threshold to 2
//! //
//! // 2 is just high enough to not race with task `exti1` for access to the
@@ -97,7 +99,7 @@
//! rtfm::bkpt();
//!
//! // Claims can be nested
-//! HIGH.claim_mut(t, |_high, _| {
+//! high.claim_mut(t, |_high, _| {
//! // This claim increases the preemption threshold to 3
//!
//! // Now `exti2` can't preempt this task
diff --git a/src/examples/_5_late_resources.rs b/src/examples/_5_late_resources.rs
index 8958e85..7ab90a4 100644
--- a/src/examples/_5_late_resources.rs
+++ b/src/examples/_5_late_resources.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_6_safe_static_mut_ref.rs b/src/examples/_6_safe_static_mut_ref.rs
index 32eb3d9..8f7267f 100644
--- a/src/examples/_6_safe_static_mut_ref.rs
+++ b/src/examples/_6_safe_static_mut_ref.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
diff --git a/src/examples/_7_generics.rs b/src/examples/_7_generics.rs
index 22bb777..5dafdbf 100644
--- a/src/examples/_7_generics.rs
+++ b/src/examples/_7_generics.rs
@@ -3,14 +3,13 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
//! extern crate stm32f103xx;
//!
//! use rtfm::{app, Resource, Threshold};
-//! use stm32f103xx::{SPI1, GPIOA};
+//! use stm32f103xx::{GPIOA, SPI1};
//!
//! app! {
//! device: stm32f103xx,
diff --git a/src/examples/_8_full_syntax.rs b/src/examples/_8_full_syntax.rs
index f8db408..cc7fbc2 100644
--- a/src/examples/_8_full_syntax.rs
+++ b/src/examples/_8_full_syntax.rs
@@ -3,7 +3,6 @@
//! ```
//! #![deny(unsafe_code)]
//! #![deny(warnings)]
-//! #![feature(proc_macro)]
//! #![no_std]
//!
//! extern crate cortex_m_rtfm as rtfm;
@@ -62,7 +61,7 @@
//!
//! pub fn idle(t: &mut Threshold, mut r: ::idle::Resources) -> ! {
//! loop {
-//! *r.OWNED != *r.OWNED;
+//! *r.OWNED = !*r.OWNED;
//!
//! if *r.OWNED {
//! if r.SHARED.claim(t, |shared, _| *shared) {
diff --git a/src/lib.rs b/src/lib.rs
index 8e5884c..9d55887 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -79,7 +79,6 @@
//! [rtfm]: http://www.diva-portal.org/smash/get/diva2:1005680/FULLTEXT01.pdf
#![deny(missing_docs)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m;
diff --git a/tests/cfail/critical-section.rs b/tests/cfail/critical-section.rs
index 6571978..c0f475c 100644
--- a/tests/cfail/critical-section.rs
+++ b/tests/cfail/critical-section.rs
@@ -1,7 +1,6 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![feature(const_fn)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/duplicated-task.rs b/tests/cfail/duplicated-task.rs
index 82b7ac6..885c961 100644
--- a/tests/cfail/duplicated-task.rs
+++ b/tests/cfail/duplicated-task.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/exception.rs b/tests/cfail/exception.rs
index e2e749a..b4e025f 100644
--- a/tests/cfail/exception.rs
+++ b/tests/cfail/exception.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/idle.rs b/tests/cfail/idle.rs
index 79fe99b..ef20e1a 100644
--- a/tests/cfail/idle.rs
+++ b/tests/cfail/idle.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/init-resource-share-idle.rs b/tests/cfail/init-resource-share-idle.rs
index 4e2ed4a..5b29f30 100644
--- a/tests/cfail/init-resource-share-idle.rs
+++ b/tests/cfail/init-resource-share-idle.rs
@@ -1,5 +1,4 @@
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/init-resource-share-task.rs b/tests/cfail/init-resource-share-task.rs
index 391c543..a93e840 100644
--- a/tests/cfail/init-resource-share-task.rs
+++ b/tests/cfail/init-resource-share-task.rs
@@ -1,5 +1,4 @@
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/init.rs b/tests/cfail/init.rs
index d2823e3..057a2ee 100644
--- a/tests/cfail/init.rs
+++ b/tests/cfail/init.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/interrupt.rs b/tests/cfail/interrupt.rs
index 7c345a1..522763a 100644
--- a/tests/cfail/interrupt.rs
+++ b/tests/cfail/interrupt.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/late-resource-init.rs b/tests/cfail/late-resource-init.rs
index a1059f3..5235d93 100644
--- a/tests/cfail/late-resource-init.rs
+++ b/tests/cfail/late-resource-init.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/lock.rs b/tests/cfail/lock.rs
index eb03b7d..9cb0f3e 100644
--- a/tests/cfail/lock.rs
+++ b/tests/cfail/lock.rs
@@ -1,7 +1,6 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![feature(const_fn)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/peripheral-alias.rs b/tests/cfail/peripheral-alias.rs
index 3528ec6..7f3790a 100644
--- a/tests/cfail/peripheral-alias.rs
+++ b/tests/cfail/peripheral-alias.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/priority-too-high.rs b/tests/cfail/priority-too-high.rs
index 15f6b7a..d63b9d0 100644
--- a/tests/cfail/priority-too-high.rs
+++ b/tests/cfail/priority-too-high.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
@@ -8,8 +7,9 @@ extern crate stm32f103xx;
use rtfm::app;
-app! { //~ error attempt to subtract with overflow
- //~^ error constant evaluation error
+app! { //~ error referenced constant has errors
+ //~^ error could not evaluate constant
+ //~| error constant evaluation error
device: stm32f103xx,
tasks: {
diff --git a/tests/cfail/priority-too-low.rs b/tests/cfail/priority-too-low.rs
index e879511..476b7a0 100644
--- a/tests/cfail/priority-too-low.rs
+++ b/tests/cfail/priority-too-low.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
@@ -8,8 +7,9 @@ extern crate stm32f103xx;
use rtfm::app;
-app! { //~ error attempt to subtract with overflow
- //~^ error constant evaluation error
+app! { //~ error referenced constant has errors
+ //~^ error could not evaluate constant
+ //~| error constant evaluation error
device: stm32f103xx,
tasks: {
diff --git a/tests/cfail/resource-alias.rs b/tests/cfail/resource-alias.rs
index e1c73bb..81eeea0 100644
--- a/tests/cfail/resource-alias.rs
+++ b/tests/cfail/resource-alias.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/resource-not-send-sync.rs b/tests/cfail/resource-not-send-sync.rs
index 60a20db..27e5cb0 100644
--- a/tests/cfail/resource-not-send-sync.rs
+++ b/tests/cfail/resource-not-send-sync.rs
@@ -1,7 +1,6 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![feature(const_fn)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
@@ -47,7 +46,7 @@ fn exti0(_t: &mut Threshold, r: EXTI0::Resources) {
// ERROR resource proxies are not `Send`able across tasks
is_send(&r.SHARED);
- //~^ error the trait bound `*const (): core::marker::Send` is not satisfied
+ //~^ error `*const ()` cannot be sent between threads safely
}
fn exti1(_t: &mut Threshold, _r: EXTI1::Resources) {
diff --git a/tests/cfail/token-outlive.rs b/tests/cfail/token-outlive.rs
index 819a3d1..41ee827 100644
--- a/tests/cfail/token-outlive.rs
+++ b/tests/cfail/token-outlive.rs
@@ -1,7 +1,6 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![feature(const_fn)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
diff --git a/tests/cfail/token-transfer.rs b/tests/cfail/token-transfer.rs
index f92e4b2..5c6a22b 100644
--- a/tests/cfail/token-transfer.rs
+++ b/tests/cfail/token-transfer.rs
@@ -1,7 +1,6 @@
#![deny(unsafe_code)]
#![deny(warnings)]
#![feature(const_fn)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;
@@ -9,7 +8,7 @@ extern crate stm32f103xx;
use rtfm::{app, Threshold};
-app! { //~ error bound `*const (): core::marker::Send` is not satisfied
+app! { //~ error `*const ()` cannot be sent between threads safely
device: stm32f103xx,
resources: {
diff --git a/tests/cfail/wrong-threshold.rs b/tests/cfail/wrong-threshold.rs
index 149f357..86d8e26 100644
--- a/tests/cfail/wrong-threshold.rs
+++ b/tests/cfail/wrong-threshold.rs
@@ -1,6 +1,5 @@
#![deny(unsafe_code)]
#![deny(warnings)]
-#![feature(proc_macro)]
#![no_std]
extern crate cortex_m_rtfm as rtfm;