Function rustminify::remove_docs

source ·
pub fn remove_docs(file: File) -> File
Expand description

Removes documentation and #[{warn, deny, forbid}(missing_docs)].

use syn::parse_quote;

assert_eq!(
    "#![deny()]pub mod module{pub struct Item;}",
    rustminify::minify_file(&rustminify::remove_docs(parse_quote! {
        #![deny(missing_docs)]
        pub mod module {
            //! module

            /// Item
            pub struct Item;
        }
    }))
);