diff options
| author | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
|---|---|---|
| committer | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
| commit | 7976f950b0de72c521f92efa350c67ccd197fab9 (patch) | |
| tree | 8759312eb000de09b92a4921f476d5c16b7e7342 /embassy-executor-macros/src/macros/task.rs | |
| parent | 828a8df18d04877df1f55f04354980b28ff2f2f8 (diff) | |
Merge branch 'main' into 17-add-support-for-boot-protocol
Diffstat (limited to 'embassy-executor-macros/src/macros/task.rs')
| -rw-r--r-- | embassy-executor-macros/src/macros/task.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/embassy-executor-macros/src/macros/task.rs b/embassy-executor-macros/src/macros/task.rs index 755948882..8ce8d6726 100644 --- a/embassy-executor-macros/src/macros/task.rs +++ b/embassy-executor-macros/src/macros/task.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | use std::str::FromStr; | 1 | use std::str::FromStr; |
| 2 | 2 | ||
| 3 | use darling::export::NestedMeta; | ||
| 4 | use darling::FromMeta; | 3 | use darling::FromMeta; |
| 4 | use darling::export::NestedMeta; | ||
| 5 | use proc_macro2::{Span, TokenStream}; | 5 | use proc_macro2::{Span, TokenStream}; |
| 6 | use quote::{format_ident, quote}; | 6 | use quote::{format_ident, quote}; |
| 7 | use syn::visit::{self, Visit}; | 7 | use syn::visit::{self, Visit}; |
| @@ -287,7 +287,11 @@ fn check_arg_ty(errors: &mut TokenStream, ty: &Type) { | |||
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | fn visit_type_impl_trait(&mut self, i: &'ast syn::TypeImplTrait) { | 289 | fn visit_type_impl_trait(&mut self, i: &'ast syn::TypeImplTrait) { |
| 290 | error(self.errors, i, "`impl Trait` is not allowed in task arguments. It is syntax sugar for generics, and tasks can't be generic."); | 290 | error( |
| 291 | self.errors, | ||
| 292 | i, | ||
| 293 | "`impl Trait` is not allowed in task arguments. It is syntax sugar for generics, and tasks can't be generic.", | ||
| 294 | ); | ||
| 291 | } | 295 | } |
| 292 | } | 296 | } |
| 293 | 297 | ||
