api-macro: mark parameter defaults as #[allow(dead_code)]

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2025-01-16 15:22:10 +01:00
parent 922c605d69
commit 703c2dee04

View File

@ -758,6 +758,7 @@ fn extract_normal_parameter(
// strip possible Option<> from this type: // strip possible Option<> from this type:
let ty = util::is_option_type(&param.ty).unwrap_or(&param.ty); let ty = util::is_option_type(&param.ty).unwrap_or(&param.ty);
default_consts.extend(quote_spanned! { span => default_consts.extend(quote_spanned! { span =>
#[allow(dead_code)]
pub const #name: #ty = #def; pub const #name: #ty = #def;
}); });