From b5f03931d1290e3d9edfd6002f02dca24e90f5d9 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Thu, 30 Nov 2023 20:33:44 +0100 Subject: [PATCH] Silence unused_doc_comments lint The lint is correct, but it's needed to make the macro work. --- src/op.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/op.rs b/src/op.rs index b451b94..9d33ae2 100644 --- a/src/op.rs +++ b/src/op.rs @@ -976,6 +976,10 @@ macro_rules! op_future { impl<$lifetime $(, $generic )* $(, const $const_generic: $const_ty )*> $name<$lifetime $(, $generic)* $(, $const_generic )*> { #[doc = concat!("Create a new `", stringify!($name), "`.")] const fn new(fd: &$lifetime $crate::AsyncFd, $( $field: $value, )* $setup_field : $setup_ty) -> $name<$lifetime $(, $generic)* $(, $const_generic )*> { + // This is needed because of the usage of `$phantom_doc`, which + // is needed for the macro to work, even though it doesn't + // create any documentation. + #[allow(unused_doc_comments)] $name { resources: std::option::Option::Some(std::cell::UnsafeCell::new(( $( $field, )*