From 584a3bb5da495abb828ed8a02b2d59d02f7e6097 Mon Sep 17 00:00:00 2001 From: Aaron Loucks Date: Sun, 17 Mar 2019 12:54:26 -0400 Subject: [PATCH] The doc parameter of define_handle is now optional --- ash/src/vk.rs | 3 +++ generator/src/lib.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 1fa4412..bf57e4e 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -222,6 +222,9 @@ macro_rules! handle_nondispatchable { } #[macro_export] macro_rules! define_handle { + ( $ name : ident , $ ty : ident ) => { + define_handle!($name, $ty, doc = ""); + }; ( $ name : ident , $ ty : ident , $ doc_link : meta ) => { #[repr(transparent)] #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash)] diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 4dcca97..8bc8a29 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -98,6 +98,9 @@ pub fn define_handle_macro() -> Tokens { quote! { #[macro_export] macro_rules! define_handle{ + ($name: ident, $ty: ident) => { + define_handle!($name, $ty, doc = ""); + }; ($name: ident, $ty: ident, $doc_link: meta) => { #[repr(transparent)] #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, Copy, Hash)]