Skip to content

Commit

Permalink
Use extended_key_value_attributes for rustdoc
Browse files Browse the repository at this point in the history
Hide this behind two layers of cfg_attr so that it still parses
pre-1.54.0.

Also, make the fallback text link be linkified.

When 1.54.0 hits stable I'll de-conditionalise this and make a 0.6.0
release with a bumped MSRV.
  • Loading branch information
illicitonion committed Jul 12, 2021
1 parent 8385dc9 commit 3b5c1b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions num_enum/src/lib.rs
@@ -1,8 +1,9 @@
#![cfg_attr(feature = "external_doc", feature(external_doc))]
#![cfg_attr(feature = "external_doc", doc(include = "../README.md"))]
// Wrap this in two cfg_attrs so that it continues to parse pre-1.54.0.
// See https://github.com/rust-lang/rust/issues/82768
#![cfg_attr(feature = "external_doc", cfg_attr(all(), doc = include_str!("../README.md")))]
#![cfg_attr(
not(feature = "external_doc"),
doc = "See https://docs.rs/num_enum for more info about this crate."
doc = "See <https://docs.rs/num_enum> for more info about this crate."
)]
#![cfg_attr(not(feature = "std"), no_std)]

Expand Down

0 comments on commit 3b5c1b3

Please sign in to comment.