Skip to content

Commit

Permalink
Silence unused_doc_comments lint
Browse files Browse the repository at this point in the history
The lint is correct, but it's needed to make the macro work.
  • Loading branch information
Thomasdezeeuw committed Nov 30, 2023
1 parent 8ac6cf7 commit b5f0393
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, )*
Expand Down

0 comments on commit b5f0393

Please sign in to comment.