From ab23b07c419ab2575a93b23d695e96d310a54a30 Mon Sep 17 00:00:00 2001 From: LucaCappelletti94 Date: Tue, 20 May 2025 14:39:54 +0200 Subject: [PATCH] Trying to resolve the clippy forbid(missing_doc) in web codegen --- actix-web-codegen/src/route.rs | 4 +++- actix-web/src/response/http_codes.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/actix-web-codegen/src/route.rs b/actix-web-codegen/src/route.rs index e24903e3a..a5700b423 100644 --- a/actix-web-codegen/src/route.rs +++ b/actix-web-codegen/src/route.rs @@ -59,6 +59,7 @@ macro_rules! standard_method_type { ( $($variant:ident, $upper:ident, $lower:ident,)+ ) => { + #[doc(hidden)] #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum MethodType { $( @@ -466,7 +467,8 @@ impl ToTokens for Route { let stream = quote! { #(#doc_attributes)* - #[allow(non_camel_case_types, missing_docs)] + #[doc(hidden)] + #[allow(non_camel_case_types)] #vis struct #name; impl ::actix_web::dev::HttpServiceFactory for #name { diff --git a/actix-web/src/response/http_codes.rs b/actix-web/src/response/http_codes.rs index db5f392c9..6be50ee6f 100644 --- a/actix-web/src/response/http_codes.rs +++ b/actix-web/src/response/http_codes.rs @@ -6,7 +6,8 @@ use crate::{HttpResponse, HttpResponseBuilder}; macro_rules! static_resp { ($name:ident, $status:expr) => { - #[allow(non_snake_case, missing_docs)] + #[allow(non_snake_case)] + #[doc(hidden)] pub fn $name() -> HttpResponseBuilder { HttpResponseBuilder::new($status) }