Skip to content

Commit

Permalink
Replace doc(include) with doc = include_str.
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence committed Sep 16, 2021
1 parent c887faf commit 7ba81d7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 28 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Entries are listed in reverse chronological order per major series.

## 4.x series

### 4.1.0

* Update `subtle-ng` to `2.5` and replace the deprecated `#[doc(include())]`
syntax with the newly-stabilized `#[doc = include_str!]` syntax.

### 4.0.1

* Update README.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "curve25519-dalek-ng"
# - update CHANGELOG
# - update html_root_url
# - update README if required by semver
version = "4.0.1"
version = "4.1.0"
authors = ["Isis Lovecruft <[email protected]>",
"Henry de Valence <[email protected]>"]
readme = "README.md"
Expand Down Expand Up @@ -39,7 +39,7 @@ harness = false
rand_core = { version = "0.6", default-features = false }
byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] }
digest = { version = "0.9", default-features = false }
subtle = { package = "subtle-ng", version = "^2.2.1", default-features = false }
subtle = { package = "subtle-ng", version = "2.5", default-features = false }
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] }
# The original packed_simd package was orphaned, see
# https://github.com/rust-lang/packed_simd/issues/303#issuecomment-701361161
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ make doc-internal
To import `curve25519-dalek`, add the following to the dependencies section of
your project's `Cargo.toml`:
```toml
curve25519-dalek-ng = "4"
curve25519-dalek-ng = "4.1"
```

To switch from the previous `curve25519-dalek` crate without changing your code,
Expand Down
5 changes: 1 addition & 4 deletions src/backend/vector/avx2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
// - Isis Agora Lovecruft <[email protected]>
// - Henry de Valence <[email protected]>

#![cfg_attr(
feature = "nightly",
doc(include = "../../../../docs/avx2-notes.md")
)]
#![doc = include_str!("../../../../docs/avx2-notes.md")]

pub(crate) mod field;

Expand Down
5 changes: 1 addition & 4 deletions src/backend/vector/ifma/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
// Authors:
// - Henry de Valence <[email protected]>

#![cfg_attr(
feature = "nightly",
doc(include = "../../../../docs/ifma-notes.md")
)]
#![doc = include_str!("../../../../docs/ifma-notes.md")]

pub mod field;

Expand Down
5 changes: 1 addition & 4 deletions src/backend/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
// - Henry de Valence <[email protected]>

// Conditionally include the notes if we're on nightly (so we can include docs at all).
#![cfg_attr(
feature = "nightly",
doc(include = "../../../docs/parallel-formulas.md")
)]
#![doc = include_str!("../../../docs/parallel-formulas.md")]

#[cfg(not(any(target_feature = "avx2", target_feature = "avx512ifma", rustdoc)))]
compile_error!("simd_backend selected without target_feature=+avx2 or +avx512ifma");
Expand Down
16 changes: 3 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,11 @@
// - Henry de Valence <[email protected]>

#![no_std]
#![cfg_attr(feature = "nightly", feature(test))]
#![cfg_attr(feature = "nightly", feature(external_doc))]
#![cfg_attr(feature = "nightly", feature(doc_cfg))]
#![cfg_attr(feature = "simd_backend", feature(stdsimd))]
// Refuse to compile if documentation is missing, but only on nightly.
//
// This means that missing docs will still fail CI, but means we can use
// README.md as the crate documentation.
#![cfg_attr(feature = "nightly", deny(missing_docs))]

#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
#![doc(html_root_url = "https://docs.rs/curve25519-dalek-ng/4.0.1")]

//! Note that docs will only build on nightly Rust until
//! [RFC 1990 stabilizes](https://github.com/rust-lang/rust/issues/44732).
#![deny(missing_docs)]
#![doc = include_str!("../README.md")]
#![doc(html_root_url = "https://docs.rs/curve25519-dalek-ng/4.1.0")]

//------------------------------------------------------------------------
// External dependencies:
Expand Down

0 comments on commit 7ba81d7

Please sign in to comment.