From 09d1363fa0156894497595d2917d3b8bd1a830d6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 27 Nov 2019 11:04:36 +0100 Subject: [PATCH] api-macro: start checking some function signature parts Signed-off-by: Wolfgang Bumiller --- proxmox-api-macro/src/api.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/proxmox-api-macro/src/api.rs b/proxmox-api-macro/src/api.rs index c4bba1e4..34e8696e 100644 --- a/proxmox-api-macro/src/api.rs +++ b/proxmox-api-macro/src/api.rs @@ -297,6 +297,8 @@ pub(crate) fn api(attr: TokenStream, item: TokenStream) -> Result Result<(), Error> { + let sig = &func.sig; + + if sig.asyncness.is_some() { + bail!(sig => "async fn is currently not supported"); + } + + Ok(()) +}