Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ rustdoc-args = [
# https://github.com/rust-lang/rust/pull/84176
"-Zunstable-options", "--generate-link-to-definition"
]
cargo-args = [
"-Zrustdoc-scrape-examples"
]

[features]
default = []
Expand All @@ -43,6 +46,7 @@ snapbox = { version = "0.6.24", features = ["dir"] }
[[example]]
name = "patch_formatter"
required-features = ["std", "color"]
doc-scrape-examples = true

[[test]]
name = "compat"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ check-no-std: ## Verify crate builds in no_std env

.PHONY: doc
doc: ## Generate documentation
RUSTDOCFLAGS="-Dwarnings --cfg=docsrs -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps
RUSTDOCFLAGS="-Dwarnings --cfg=docsrs -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps -Zrustdoc-scrape-examples

.PHONY: doc-open
doc-open: ## Generate and open documentation
RUSTDOCFLAGS="--cfg=docsrs -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps --open
RUSTDOCFLAGS="--cfg=docsrs -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps --open -Zrustdoc-scrape-examples

.PHONY: is-dirty
is-dirty: ## Checks if repository is dirty
Expand Down
Loading