diff --git a/.travis.yml b/.travis.yml index 7c6bff41d6..8e8aafb758 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 bd7ffe0310..0000000000 --- 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 3c41921194..e63e805481 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 79d6cc461c..826e9dd132 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 5b27412265..9bdcd7b428 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 ca7726d0b7..aceba1a920 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 07c321f673..3bfc38846d 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 6af70879d4..46c00b2b09 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 c62fbbfed8..dc2bfd29b4 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 8e501887c3..340b976682 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 81dbde26b9..9579f52340 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 4f567f0cea..23489151a1 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 b1ebab6f8e..abd1c4cd25 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 d36499e4bc..794b30be49 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 4defb46d7d..b81fc4d435 100644 --- a/macros/src/check.rs +++ b/macros/src/check.rs @@ -61,7 +61,7 @@ pub fn app(app: check::App) -> Result { 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 728e6133ec..65d5ad89d0 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 964b1a3081..dcd6cfb673 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, root: &mut Vec) { +fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec, root: &mut Vec) { let krate = krate(); let mut mod_items = vec![]; @@ -54,7 +53,7 @@ fn idle(app: &App, ownerships: &Ownerships, main: &mut Vec, 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, 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, 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, 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, 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, root: &mut V }); } -fn init(app: &App, main: &mut Vec, root: &mut Vec) { +fn init(app: &App, main: &mut Vec, root: &mut Vec) { let device = &app.device; let krate = krate(); @@ -263,7 +262,7 @@ fn init(app: &App, main: &mut Vec, root: &mut Vec) { &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, root: &mut Vec) { 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, root: &mut Vec) { }); } -fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec) { +fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec) { 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) { } } -fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec, main: &mut Vec) { +fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec, main: &mut Vec) { let device = &app.device; let krate = krate(); @@ -456,7 +455,7 @@ fn tasks(app: &App, ownerships: &Ownerships, root: &mut Vec, 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, 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 90f16d485f..0484bb9d5e 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 c9004e86ac..b9075a5916 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 cf6b33d638..516ff0c979 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 4360185afc..14c9d9256b 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 e211cf878c..26f8fd84ad 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 8958e85489..7ab90a4e20 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 32eb3d98f1..8f7267f50c 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 22bb777af1..5dafdbf2f0 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 f8db408753..cc7fbc22c7 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 8e5884cab8..9d558875c7 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 65719788cb..c0f475c474 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 82b7ac6306..885c961c0b 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 e2e749a27e..b4e025fcda 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 79fe99b0da..ef20e1a8d4 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 4e2ed4aa84..5b29f302a2 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 391c543d2c..a93e840ee5 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 d2823e3f82..057a2ee2b3 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 7c345a11e3..522763a4b0 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 a1059f3403..5235d930a3 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 eb03b7d541..9cb0f3e6b1 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 3528ec666b..7f3790a552 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 15f6b7a86c..d63b9d05cf 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 e87951121f..476b7a07f7 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 e1c73bb581..81eeea07d0 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 60a20db1aa..27e5cb0591 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 819a3d1583..41ee827b7b 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 f92e4b2b73..5c6a22b1e7 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 149f357da3..86d8e26230 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;