Closed
Description
Current Behavior
I just published downcast-rs
v2.0.0 and the documentation appears misformatted even though it appears fine on docs.rs. Compare:
- https://crates.io/crates/downcast_rs/2.0.0
- https://docs.rs/downcast-rs/2.0.0/downcast_rs/
This seems due to code within the documentation that is only conditionally run for testing based on whether a feature is enabled:
...
//! Since 2.0.0, the minimum supported Rust version is 1.56.
//!
#![cfg_attr(feature = "sync", doc = "```")]
#![cfg_attr(not(feature = "sync"), doc = "```ignore")]
//! # #[macro_use]
//! # extern crate downcast_rs;
...
Effectively, the code block is being started with ```
when the sync
feature is enabled and with ```ignore
when it's disabled.
Also:
- Any workarounds?
- Any way to discover such issues before publishing?
Expected Behavior
crates.io should render the documentation as well as docs.rs does.
Metadata
Metadata
Assignees
Labels
No labels