Skip to content

Commit

Permalink
Motivate cfg_attr in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JSorngard committed Dec 16, 2023
1 parent 04b09aa commit ea976f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions codec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
//! # Ok::<(), Error>(())
//! ```
//!
// This ensures that `cargo test` still works if the macro feature is disabled.
#![cfg_attr(
feature = "macro",
doc = " Encode Rust source code and embed it in your program with the [`zalgo_embed!`] proc-macro:\n ```\n # use zalgo_codec::zalgo_embed;\n // This grapheme cluster was made by encoding \"fn add(x: i32, y: i32) -> i32 {x + y}\"\n zalgo_embed!(\"E͎͉͙͉̞͉͙͆̀́̈́̈́̈̀̓̒̌̀̀̓̒̉̀̍̀̓̒̀͛̀̋̀͘̚̚͘͝\");\n\n // The `add` function is now available\n assert_eq!(add(10, 20), 30);\n ```"
Expand Down

0 comments on commit ea976f2

Please sign in to comment.