Open mcskware opened 2 months ago
If there are any suggestions for what the generated comment should read, I'm happy to change that. The comment won't in general be visible, of course, but will show up when a user expands the macro. The current comment simply reads "The function which runs the benchmarks."
tl;dr: One-liner to add a doc comment to the generated benchmark runner fn from the
criterion_group!
macro.The
rustc
lintmissing-docs
is triggered when using thecriterion_group!
macro. For users who specify the lint on theirrustc
command line, this can generate a warning that they are unable to quiet without an inner allow attribute (e.g. using#![allow(missing-docs)]
at the head of their source file). This will surpress any other missing docs in their own code, which may be unexpected behavior.I don't see any real downsides to this change, but I'm brand new to the criterion.rs codebase. Comments, discussion, and suggestions very welcome on this proposed change. For instance, I have no idea if this change warrants an entry in the changelog. Cheers!