From 7b598c0749aa5390cfefc8e138c05fafa7599dc6 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 29 May 2018 12:23:09 +0200 Subject: [PATCH] bump rtfm-syntax --- examples/event-task.rs | 1 + examples/idle.rs | 1 + examples/minimal.rs | 1 + examples/periodic-payload.rs | 1 + examples/periodic-preemption-payload.rs | 1 + examples/periodic-preemption.rs | 3 +- examples/periodic.rs | 1 + examples/schedule-after-from-event-task.rs | 1 + examples/schedule-after.rs | 1 + examples/schedule-now-from-event-task.rs | 1 + examples/schedule-now.rs | 1 + examples/user-struct.rs | 1 + macros/Cargo.toml | 6 +- macros/src/analyze.rs | 46 ++++-- macros/src/trans.rs | 178 +++++++++++++-------- tests/cfail/critical-section.rs | 1 + tests/cfail/exception.rs | 1 + tests/cfail/idle.rs | 1 + tests/cfail/init-resource-share-idle.rs | 1 + tests/cfail/init-resource-share-task.rs | 1 + tests/cfail/init.rs | 1 + tests/cfail/interrupt.rs | 1 + tests/cfail/late-resource-init.rs | 1 + tests/cfail/lock.rs | 1 + tests/cfail/priority-too-high.rs | 1 + tests/cfail/priority-too-low.rs | 1 + tests/cfail/resource-alias.rs | 1 + tests/cfail/resource-not-send-sync.rs | 1 + tests/cfail/token-outlive.rs | 1 + tests/cfail/token-transfer.rs | 1 + tests/cfail/wrong-threshold.rs | 1 + 31 files changed, 175 insertions(+), 85 deletions(-) diff --git a/examples/event-task.rs b/examples/event-task.rs index 0f51bbfaf3..6c36762655 100644 --- a/examples/event-task.rs +++ b/examples/event-task.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/idle.rs b/examples/idle.rs index e4303b9161..ae1e284d8b 100644 --- a/examples/idle.rs +++ b/examples/idle.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/minimal.rs b/examples/minimal.rs index da76629dc8..42ce9c54c4 100644 --- a/examples/minimal.rs +++ b/examples/minimal.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/periodic-payload.rs b/examples/periodic-payload.rs index e99001ea58..452cdacb70 100644 --- a/examples/periodic-payload.rs +++ b/examples/periodic-payload.rs @@ -35,6 +35,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/periodic-preemption-payload.rs b/examples/periodic-preemption-payload.rs index 1397ac2f98..0cdf204bc7 100644 --- a/examples/periodic-preemption-payload.rs +++ b/examples/periodic-preemption-payload.rs @@ -64,6 +64,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/periodic-preemption.rs b/examples/periodic-preemption.rs index 3ca458061b..069e61b272 100644 --- a/examples/periodic-preemption.rs +++ b/examples/periodic-preemption.rs @@ -65,6 +65,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] @@ -78,7 +79,7 @@ extern crate stm32f103xx; use cortex_m::peripheral::{DWT, ITM}; use rt::ExceptionFrame; -use rtfm::{app, Resource}; +use rtfm::app; app! { device: stm32f103xx, diff --git a/examples/periodic.rs b/examples/periodic.rs index 875d5b896d..61fe14061b 100644 --- a/examples/periodic.rs +++ b/examples/periodic.rs @@ -33,6 +33,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/schedule-after-from-event-task.rs b/examples/schedule-after-from-event-task.rs index de7da763b8..c7190d3c99 100644 --- a/examples/schedule-after-from-event-task.rs +++ b/examples/schedule-after-from-event-task.rs @@ -1,5 +1,6 @@ #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/schedule-after.rs b/examples/schedule-after.rs index f8a00a1947..72d45164a1 100644 --- a/examples/schedule-after.rs +++ b/examples/schedule-after.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/schedule-now-from-event-task.rs b/examples/schedule-now-from-event-task.rs index d900e8fe3c..ddcf6d58ff 100644 --- a/examples/schedule-now-from-event-task.rs +++ b/examples/schedule-now-from-event-task.rs @@ -1,5 +1,6 @@ #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/schedule-now.rs b/examples/schedule-now.rs index c8fca6d51c..f1b038321b 100644 --- a/examples/schedule-now.rs +++ b/examples/schedule-now.rs @@ -9,6 +9,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/examples/user-struct.rs b/examples/user-struct.rs index 9a85eaf30c..b46d7a5a1e 100644 --- a/examples/user-struct.rs +++ b/examples/user-struct.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 81b788c575..cc893cd262 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -11,11 +11,11 @@ version = "0.3.1" [dependencies] failure = "0.1.1" -proc-macro2 = "0.3.6" -quote = "0.5.1" +proc-macro2 = "0.4.4" +quote = "0.6.3" # rtfm-syntax = "0.4.0" rtfm-syntax = { git = "https://github.com/japaric/rtfm-syntax", branch = "tq" } -syn = "0.13.1" +syn = "0.14.1" [dependencies.either] version = "1" diff --git a/macros/src/analyze.rs b/macros/src/analyze.rs index 3bfc72f36b..365030ca72 100644 --- a/macros/src/analyze.rs +++ b/macros/src/analyze.rs @@ -13,14 +13,19 @@ pub fn app(app: &App) -> Context { let mut tq = TimerQueue::new(); let mut free_interrupts = app.free_interrupts.iter().cloned().collect::>(); - schedule_now.extend(&app.init.schedule_now); + schedule_now.extend(app.init.schedule_now.iter().cloned()); for task in &app.init.schedule_after { - schedule_after.insert(*task); + schedule_after.insert(task.clone()); // Timer queue - if let Entry::Vacant(entry) = tq.tasks.entry(*task) { - tq.capacity += app.tasks[task].interrupt_or_instances.right().unwrap(); + if let Entry::Vacant(entry) = tq.tasks.entry(task.clone()) { + tq.capacity += app.tasks[task] + .interrupt_or_instances + .as_ref() + .right() + .clone() + .unwrap(); entry.insert(app.tasks[task].priority); } } @@ -28,28 +33,33 @@ pub fn app(app: &App) -> Context { // compute dispatchers for (name, task) in &app.tasks { match task.interrupt_or_instances { - Either::Left(interrupt) => { - triggers.insert(interrupt, (*name, task.priority)); + Either::Left(ref interrupt) => { + triggers.insert(interrupt.clone(), (name.clone(), task.priority)); } Either::Right(instances) => { let dispatcher = dispatchers.entry(task.priority).or_insert_with(|| { Dispatcher::new(free_interrupts.pop().expect("not enough free interrupts")) }); - dispatcher.tasks.push(*name); + dispatcher.tasks.push(name.clone()); dispatcher.capacity += instances; } } for task in &task.schedule_now { - schedule_now.insert(*task); + schedule_now.insert(task.clone()); } for task in &task.schedule_after { - schedule_after.insert(*task); + schedule_after.insert(task.clone()); // Timer queue - if let Entry::Vacant(entry) = tq.tasks.entry(*task) { - tq.capacity += app.tasks[task].interrupt_or_instances.right().unwrap(); + if let Entry::Vacant(entry) = tq.tasks.entry(task.clone()) { + tq.capacity += app.tasks[task] + .interrupt_or_instances + .as_ref() + .right() + .clone() + .unwrap(); entry.insert(app.tasks[task].priority); } } @@ -83,7 +93,7 @@ pub fn app(app: &App) -> Context { })) { let ceiling = ceilings .resources - .entry(*resource) + .entry(resource.clone()) .or_insert(Ceiling::Owned(priority)); if priority > (*ceiling).into() { *ceiling = Ceiling::Shared(priority); @@ -101,7 +111,10 @@ pub fn app(app: &App) -> Context { }) { // schedule_now callers contend for the consumer end of the task slot queue (#task::SQ) and // .. - let ceiling = ceilings.slot_queues.entry(*task).or_insert(caller_priority); + let ceiling = ceilings + .slot_queues + .entry(task.clone()) + .or_insert(caller_priority); if caller_priority > *ceiling { *ceiling = caller_priority; @@ -128,7 +141,10 @@ pub fn app(app: &App) -> Context { }) { // schedule_after callers contend for the consumer end of the task slot queue (#task::SQ) // and .. - let ceiling = ceilings.slot_queues.entry(*task).or_insert(caller_priority); + let ceiling = ceilings + .slot_queues + .entry(task.clone()) + .or_insert(caller_priority); if caller_priority > *ceiling { *ceiling = caller_priority; @@ -209,7 +225,7 @@ impl Dispatcher { } pub fn interrupt(&self) -> Ident { - self.interrupt + self.interrupt.clone() } pub fn tasks(&self) -> &[Ident] { diff --git a/macros/src/trans.rs b/macros/src/trans.rs index d21a8a5b67..d80eface8b 100644 --- a/macros/src/trans.rs +++ b/macros/src/trans.rs @@ -1,14 +1,14 @@ -use quote::Tokens; - use either::Either; +use proc_macro2::Span; +use proc_macro2::TokenStream; use syn::Ident; use syntax::check::App; use analyze::Context; -pub fn app(ctxt: &Context, app: &App) -> Tokens { +pub fn app(ctxt: &Context, app: &App) -> TokenStream { let mut root = vec![]; - let k = Ident::from("_rtfm"); + let k = Ident::new("_rtfm", Span::call_site()); let device = &app.device; let needs_tq = !ctxt.schedule_after.is_empty(); @@ -34,15 +34,18 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { .map(|e| quote!(#e)) .unwrap_or_else(|| quote!(unsafe { ::#k::_impl::uninitialized() })); - let ceiling = Ident::from(format!( - "U{}", - ctxt.ceilings - .resources() - .get(name) - .cloned() - .map(u8::from) - .unwrap_or(0) // 0 = resource owned by `init` - )); + let ceiling = Ident::new( + &format!( + "U{}", + ctxt.ceilings + .resources() + .get(name) + .cloned() + .map(u8::from) + .unwrap_or(0) // 0 = resource owned by `init` + ), + Span::call_site(), + ); root.push(quote! { #[allow(unsafe_code)] unsafe impl ::#k::Resource for _resource::#name { @@ -183,7 +186,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { for (name, task) in &app.tasks { let path = &task.path; - let lifetime = if task.resources + let lifetime = if task + .resources .iter() .any(|res| ctxt.ceilings.resources()[res].is_owned()) { @@ -192,11 +196,10 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { None }; - let _context = Ident::from(format!( - "_ZN{}{}7ContextE", - name.as_ref().as_bytes().len(), - name - )); + let _context = Ident::new( + &format!("_ZN{}{}7ContextE", name.to_string().as_bytes().len(), name), + Span::call_site(), + ); let mut mod_ = vec![]; @@ -206,7 +209,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { quote!(scheduled_time) }; - let input_ = task.input + let input_ = task + .input .as_ref() .map(|input| quote!(#input)) .unwrap_or(quote!(())); @@ -261,7 +265,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }); } - let res_fields = task.resources + let res_fields = task + .resources .iter() .map(|res| { if ctxt.ceilings.resources()[res].is_owned() { @@ -281,7 +286,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { } }); - let tasks_fields = task.schedule_now + let tasks_fields = task + .schedule_now .iter() .map(|task| quote!(pub #task: ::_schedule_now::#task)) .chain( @@ -291,7 +297,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { ) .collect::>(); - let tasks_exprs = task.schedule_now + let tasks_exprs = task + .schedule_now .iter() .map(|task| { if cfg!(feature = "timer-queue") { @@ -307,7 +314,7 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { ) .collect::>(); - let priority = Ident::from(format!("U{}", task.priority)); + let priority = Ident::new(&format!("U{}", task.priority), Span::call_site()); mod_.push(quote! { #[allow(unused_imports)] use ::#k::Resource; @@ -363,9 +370,9 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { } match task.interrupt_or_instances { - Either::Left(interrupt) => { - let export_name = interrupt.as_ref(); - let fn_name = Ident::from(format!("_{}", interrupt)); + Either::Left(ref interrupt) => { + let export_name = interrupt.to_string(); + let fn_name = Ident::new(&format!("_{}", interrupt), Span::call_site()); let bl = if cfg!(feature = "timer-queue") { Some(quote!(_now,)) @@ -387,7 +394,7 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }); } Either::Right(instances) => { - let ucapacity = Ident::from(format!("U{}", instances)); + let ucapacity = Ident::new(&format!("U{}", instances), Span::call_site()); let capacity = instances as usize; root.push(quote! { @@ -408,13 +415,19 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }); - let ceiling = Ident::from(format!( - "U{}", - ctxt.ceilings.slot_queues().get(name).cloned() // 0 = owned by init + let ceiling = Ident::new( + &format!( + "U{}", + ctxt.ceilings.slot_queues().get(name).cloned() // 0 = owned by init .unwrap_or(0) - )); + ), + Span::call_site(), + ); - let mangled = Ident::from(format!("_ZN{}{}6PAYLOADSE", name.as_ref().len(), name)); + let mangled = Ident::new( + &format!("_ZN{}{}6PAYLOADSE", name.to_string().len(), name), + Span::call_site(), + ); // NOTE must be in the root because of `#input` root.push(quote! { @@ -459,15 +472,17 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { } /* schedule_now */ - let schedule_now = ctxt.schedule_now + let schedule_now = ctxt + .schedule_now .iter() .map(|name| { let task = &app.tasks[name]; let priority = task.priority; - let _priority = Ident::from(format!("_{}", priority)); + let _priority = Ident::new(&format!("_{}", priority), Span::call_site()); let interrupt = ctxt.dispatchers[&priority].interrupt(); - let input_ = task.input + let input_ = task + .input .as_ref() .map(|input| quote!(#input)) .unwrap_or(quote!(())); @@ -477,12 +492,18 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { (quote!(), quote!(())) }; - let sqc = Ident::from(format!( - "U{}", - ctxt.ceilings.slot_queues().get(name).cloned() // 0 = owned by init + let sqc = Ident::new( + &format!( + "U{}", + ctxt.ceilings.slot_queues().get(name).cloned() // 0 = owned by init .unwrap_or(0) - )); - let qc = Ident::from(format!("U{}", ctxt.ceilings.dispatch_queues()[&priority])); + ), + Span::call_site(), + ); + let qc = Ident::new( + &format!("U{}", ctxt.ceilings.dispatch_queues()[&priority]), + Span::call_site(), + ); if cfg!(feature = "timer-queue") { root.push(quote! { @@ -620,18 +641,26 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }); /* schedule_after */ - let schedule_after = ctxt.schedule_after + let schedule_after = ctxt + .schedule_after .iter() .map(|name| { let task = &app.tasks[name]; - let sqc = Ident::from(format!( - "U{}", - ctxt.ceilings.slot_queues().get(name).unwrap_or(&0) // 0 = owned by init - )); - let tqc = Ident::from(format!("U{}", ctxt.ceilings.timer_queue())); + let sqc = Ident::new( + &format!( + "U{}", + ctxt.ceilings.slot_queues().get(name).unwrap_or(&0) // 0 = owned by init + ), + Span::call_site(), + ); + let tqc = Ident::new( + &format!("U{}", ctxt.ceilings.timer_queue()), + Span::call_site(), + ); - let input_ = task.input + let input_ = task + .input .as_ref() .map(|input| quote!(#input)) .unwrap_or(quote!(())); @@ -649,7 +678,7 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { #[inline] pub fn schedule_after

( &self, - p: &::#k::Priority

, + _p: &::#k::Priority

, after: u32, #payload_in ) -> Result<(), #input_> @@ -722,13 +751,17 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { /* Timer queue */ if needs_tq { - let capacity = Ident::from(format!("U{}", ctxt.timer_queue.capacity())); + let capacity = Ident::new( + &format!("U{}", ctxt.timer_queue.capacity()), + Span::call_site(), + ); let tasks = ctxt.timer_queue.tasks().keys(); - let arms = ctxt.timer_queue + let arms = ctxt + .timer_queue .tasks() .iter() .map(|(name, priority)| { - let _priority = Ident::from(format!("_{}", priority)); + let _priority = Ident::new(&format!("_{}", priority), Span::call_site()); let interrupt = ctxt.dispatchers[priority].interrupt(); quote! { @@ -743,8 +776,11 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }) .collect::>(); - let ceiling = Ident::from(format!("U{}", ctxt.ceilings.timer_queue())); - let priority = Ident::from(format!("U{}", ctxt.sys_tick)); + let ceiling = Ident::new( + &format!("U{}", ctxt.ceilings.timer_queue()), + Span::call_site(), + ); + let priority = Ident::new(&format!("U{}", ctxt.sys_tick), Span::call_site()); root.push(quote! { mod _tq { #[allow(non_camel_case_types)] @@ -800,10 +836,13 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { /* Dispatchers */ for (priority, dispatcher) in &ctxt.dispatchers { - let _priority = Ident::from(format!("_{}", priority)); - let capacity = Ident::from(format!("U{}", dispatcher.capacity())); + let _priority = Ident::new(&format!("_{}", priority), Span::call_site()); + let capacity = Ident::new(&format!("U{}", dispatcher.capacity()), Span::call_site()); let tasks = dispatcher.tasks(); - let ceiling = Ident::from(format!("U{}", ctxt.ceilings.dispatch_queues()[priority])); + let ceiling = Ident::new( + &format!("U{}", ctxt.ceilings.dispatch_queues()[priority]), + Span::call_site(), + ); root.push(quote! { mod #_priority { @@ -873,8 +912,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { .collect::>(); let interrupt = dispatcher.interrupt(); - let export_name = interrupt.as_ref(); - let fn_name = Ident::from(format!("_{}", export_name)); + let export_name = interrupt.to_string(); + let fn_name = Ident::new(&format!("_{}", export_name), Span::call_site()); root.push(quote! { #[allow(non_snake_case)] #[allow(unsafe_code)] @@ -956,7 +995,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }; /* init */ - let res_fields = app.init + let res_fields = app + .init .resources .iter() .map(|r| { @@ -968,13 +1008,15 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }) .collect::>(); - let res_exprs = app.init + let res_exprs = app + .init .resources .iter() .map(|r| quote!(#r: #r::_new())) .collect::>(); - let tasks_fields = app.init + let tasks_fields = app + .init .schedule_now .iter() .map(|task| quote!(pub #task: ::_schedule_now::#task)) @@ -986,7 +1028,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { ) .collect::>(); - let tasks_exprs = app.init + let tasks_exprs = app + .init .schedule_now .iter() .map(|task| { @@ -1004,7 +1047,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { ) .collect::>(); - let late_resources = app.resources + let late_resources = app + .resources .iter() .filter_map(|(name, res)| { if res.expr.is_none() && !app.init.resources.contains(name) { @@ -1158,7 +1202,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { /* idle */ if let Some(idle) = app.idle.as_ref() { - let res_fields = idle.resources + let res_fields = idle + .resources .iter() .map(|res| { if ctxt.ceilings.resources()[res].is_owned() { @@ -1171,7 +1216,8 @@ pub fn app(ctxt: &Context, app: &App) -> Tokens { }) .collect::>(); - let res_exprs = idle.resources + let res_exprs = idle + .resources .iter() .map(|res| { if ctxt.ceilings.resources()[res].is_owned() { diff --git a/tests/cfail/critical-section.rs b/tests/cfail/critical-section.rs index ca521a80a7..b15bd88891 100644 --- a/tests/cfail/critical-section.rs +++ b/tests/cfail/critical-section.rs @@ -2,6 +2,7 @@ #![deny(warnings)] #![feature(const_fn)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/exception.rs b/tests/cfail/exception.rs index 894c42ae22..9cb2debf8c 100644 --- a/tests/cfail/exception.rs +++ b/tests/cfail/exception.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/idle.rs b/tests/cfail/idle.rs index 6de08b3720..ec30fd4cb8 100644 --- a/tests/cfail/idle.rs +++ b/tests/cfail/idle.rs @@ -2,6 +2,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/init-resource-share-idle.rs b/tests/cfail/init-resource-share-idle.rs index f795b0a800..51d160f7d2 100644 --- a/tests/cfail/init-resource-share-idle.rs +++ b/tests/cfail/init-resource-share-idle.rs @@ -1,5 +1,6 @@ #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/init-resource-share-task.rs b/tests/cfail/init-resource-share-task.rs index e016a18f13..1643442e58 100644 --- a/tests/cfail/init-resource-share-task.rs +++ b/tests/cfail/init-resource-share-task.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/init.rs b/tests/cfail/init.rs index 7a356e125c..9176c4db57 100644 --- a/tests/cfail/init.rs +++ b/tests/cfail/init.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/interrupt.rs b/tests/cfail/interrupt.rs index faeb96bd85..8566b0313c 100644 --- a/tests/cfail/interrupt.rs +++ b/tests/cfail/interrupt.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/late-resource-init.rs b/tests/cfail/late-resource-init.rs index 30ddd0a67c..de48f0b0a9 100644 --- a/tests/cfail/late-resource-init.rs +++ b/tests/cfail/late-resource-init.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/lock.rs b/tests/cfail/lock.rs index bc3c47b2f1..82d0bd43bc 100644 --- a/tests/cfail/lock.rs +++ b/tests/cfail/lock.rs @@ -2,6 +2,7 @@ #![deny(warnings)] #![feature(const_fn)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/priority-too-high.rs b/tests/cfail/priority-too-high.rs index 7092b488ea..80a7e39db5 100644 --- a/tests/cfail/priority-too-high.rs +++ b/tests/cfail/priority-too-high.rs @@ -1,4 +1,5 @@ #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/priority-too-low.rs b/tests/cfail/priority-too-low.rs index 369b66dcbe..a72641b1ac 100644 --- a/tests/cfail/priority-too-low.rs +++ b/tests/cfail/priority-too-low.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/resource-alias.rs b/tests/cfail/resource-alias.rs index 76a043029f..1e7b9f9846 100644 --- a/tests/cfail/resource-alias.rs +++ b/tests/cfail/resource-alias.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/resource-not-send-sync.rs b/tests/cfail/resource-not-send-sync.rs index 4255835508..e0296089bf 100644 --- a/tests/cfail/resource-not-send-sync.rs +++ b/tests/cfail/resource-not-send-sync.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/token-outlive.rs b/tests/cfail/token-outlive.rs index dde18c2a93..7d0656ae11 100644 --- a/tests/cfail/token-outlive.rs +++ b/tests/cfail/token-outlive.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/token-transfer.rs b/tests/cfail/token-transfer.rs index adac222f11..0574197afb 100644 --- a/tests/cfail/token-transfer.rs +++ b/tests/cfail/token-transfer.rs @@ -2,6 +2,7 @@ #![deny(warnings)] #![feature(const_fn)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std] diff --git a/tests/cfail/wrong-threshold.rs b/tests/cfail/wrong-threshold.rs index 211279801a..ac4c088c94 100644 --- a/tests/cfail/wrong-threshold.rs +++ b/tests/cfail/wrong-threshold.rs @@ -1,6 +1,7 @@ #![deny(unsafe_code)] #![deny(warnings)] #![feature(proc_macro)] +#![feature(proc_macro_gen)] #![no_main] #![no_std]