Skip to content

Commit

Permalink
Allow missing documentation for generated statics and functions (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Nov 5, 2020
1 parent 58e3d49 commit 182ee78
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions command_attr/src/lib.rs
Expand Up @@ -208,6 +208,7 @@ pub fn command(attr: TokenStream, input: TokenStream) -> TokenStream {

(quote! {
#(#cooked)*
#[allow(missing_docs)]
pub static #options: #options_path = #options_path {
checks: #checks,
bucket: #bucket,
Expand All @@ -228,11 +229,13 @@ pub fn command(attr: TokenStream, input: TokenStream) -> TokenStream {
};

#(#cooked2)*
#[allow(missing_docs)]
pub static #n: #command_path = #command_path {
fun: #name,
options: &#options,
};

#[allow(missing_docs)]
#visibility fn #name<'fut> (#(#args),*) -> ::serenity::futures::future::BoxFuture<'fut, #ret> {
use ::serenity::futures::future::FutureExt;

Expand Down Expand Up @@ -464,6 +467,7 @@ pub fn help(attr: TokenStream, input: TokenStream) -> TokenStream {

(quote! {
#(#cooked)*
#[allow(missing_docs)]
pub static #options: #options_path = #options_path {
names: &[#(#names),*],
suggestion_text: #suggestion_text,
Expand Down Expand Up @@ -497,11 +501,13 @@ pub fn help(attr: TokenStream, input: TokenStream) -> TokenStream {
};

#(#cooked2)*
#[allow(missing_docs)]
pub static #n: #command_path = #command_path {
fun: #nn,
options: &#options,
};

#[allow(missing_docs)]
pub fn #nn<'fut>(#(#args),*) -> ::serenity::futures::future::BoxFuture<'fut, #ret> {
use ::serenity::futures::future::FutureExt;

Expand Down Expand Up @@ -679,6 +685,7 @@ pub fn group(attr: TokenStream, input: TokenStream) -> TokenStream {

(quote! {
#(#cooked)*
#[allow(missing_docs)]
pub static #options: #options_path = #options_path {
prefixes: &[#(#prefixes),*],
only_in: #only_in,
Expand All @@ -695,6 +702,7 @@ pub fn group(attr: TokenStream, input: TokenStream) -> TokenStream {
};

#(#cooked2)*
#[allow(missing_docs)]
pub static #n: #group_path = #group_path {
name: #name,
options: &#options,
Expand Down Expand Up @@ -763,13 +771,15 @@ pub fn check(_attr: TokenStream, input: TokenStream) -> TokenStream {
let args = fun.args;

(quote! {
#[allow(missing_docs)]
pub static #name: #check = #check {
name: #n2,
function: #n,
display_in_help: #display_in_help,
check_in_help: #check_in_help
};

#[allow(missing_docs)]
#visibility fn #n<'fut>(#(#args),*) -> ::serenity::futures::future::BoxFuture<'fut, #ret> {
use ::serenity::futures::future::FutureExt;

Expand All @@ -796,6 +806,7 @@ pub fn hook(_attr: TokenStream, input: TokenStream) -> TokenStream {

(quote! {
#(#cooked)*
#[allow(missing_docs)]
#visibility fn #fun_name<'fut>(#(#args),*) -> ::serenity::futures::future::BoxFuture<'fut, #ret> {
use ::serenity::futures::future::FutureExt;

Expand Down

0 comments on commit 182ee78

Please sign in to comment.