Skip to content

Commit 6aa6561

Browse files
committed
Update documentation.
1 parent 104f195 commit 6aa6561

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [1.0.1] (2024-07-16)
1111

12+
### Added
13+
* Updated documentation.
14+
15+
## [1.0.1] (2024-07-16)
16+
1217
### Added
1318
* Added attribute call during docs.rs builds to generate railroad diagram.
1419
* The attribute proc macro is published in the crate [cifg-diag-attr][attr-crates-io].

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cifg"
3-
version = "1.0.1"
3+
version = "1.0.2"
44

55
categories = ["no-std", "rust-patterns"]
66
description = "A macro for defining #[cfg] if/else blocks; alternate to cfg-if."

src/lib.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,19 @@
7777
/// ```
7878
///
7979
/// # Expansion Diagram
80-
///
81-
/// ![cifg railroad diagram][diagram]
82-
///
8380
#[cfg_attr(
8481
not(feature = "docs"),
85-
doc = "[diagram]: https://docs.rs/cifg/latest/cifg/macro.cifg.html#expansion-diagram"
82+
doc = "[View diagram on docs.rs][diag-docs-rs] \n \n"
83+
)]
84+
#[cfg_attr(
85+
not(feature = "docs"),
86+
doc = "[diag-docs-rs]: https://docs.rs/cifg/latest/cifg/macro.cifg.html#expansion-diagram"
87+
)]
88+
#[cfg_attr(
89+
feature = "docs",
90+
doc = "![cifg railroad diagram][diagram] \n \n",
91+
cifg_diag_attr::gen_rr_diag("diagram")
8692
)]
87-
#[cfg_attr(feature = "docs", cifg_diag_attr::gen_rr_diag("diagram"))]
8893
#[macro_export]
8994
macro_rules! cifg {
9095
// Main entry; create a cfg'd block for the initial condition.

0 commit comments

Comments
 (0)