Skip to content

Commit

Permalink
docs: try to fix doc(cfg()) usage for docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
decathorpe committed Feb 11, 2022
1 parent 81ee452 commit ecba3e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion dxr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
//! - null values (`<nil/>`): mapped to [`Option`]`<T>`, enabled with the `nil` feature

#[cfg(feature = "derive")]
#[doc(inline)]
#[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
pub use dxr_derive::{FromDXR, ToDXR};

#[doc(inline)]
Expand Down
3 changes: 0 additions & 3 deletions dxr_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#![warn(unused_import_braces)]
#![warn(unused_qualifications)]
#![warn(clippy::unwrap_used)]
#![cfg_attr(docsrs, feature(doc_cfg))]

//! # dxr_derive
//!
Expand All @@ -33,7 +32,6 @@ fn use_dxr() -> TokenStream2 {
}

/// procedural macro for deriving the `FromDXR` trait for structs
#[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
#[proc_macro_derive(FromDXR)]
pub fn from_dxr(input: TokenStream) -> TokenStream {
let mut input = parse_macro_input!(input as DeriveInput);
Expand Down Expand Up @@ -98,7 +96,6 @@ pub fn from_dxr(input: TokenStream) -> TokenStream {
}

/// procedural macro for deriving the `ToDXR` trait for structs
#[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
#[proc_macro_derive(ToDXR)]
pub fn to_dxr(input: TokenStream) -> TokenStream {
let mut input = parse_macro_input!(input as DeriveInput);
Expand Down

0 comments on commit ecba3e1

Please sign in to comment.