Skip to content

Commit e7936a6

Browse files
authored
add html_root_url to daft-derive (#53)
This allows cargo sync-rdme to link to daft-derive.
1 parent 54c3c7f commit e7936a6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

daft-derive/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
//! Derive macro for daft (internal crate).
22
//!
33
//! For more information about daft, see [its documentation](https://docs.rs/daft).
4-
4+
// Setting html_root_url allows daft's readme to have links to daft-derive. This
5+
// line is updated by cargo-release.
6+
#![doc(html_root_url = "https://docs.rs/daft-derive/0.1.0")]
57
mod internals;
68

79
use syn::parse_macro_input;

daft/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<!-- cargo-sync-rdme rustdoc [[ -->
1111
Daft is a library to perform semantic diffs of Rust data structures.
1212

13-
Daft consists of a trait called [`Diffable`](https://docs.rs/daft/0.1.0/daft/diffable/trait.Diffable.html), along with \[a derive
14-
macro\]\[macro@Diffable\] by the same name. This trait represents the
13+
Daft consists of a trait called [`Diffable`](https://docs.rs/daft/0.1.0/daft/diffable/trait.Diffable.html), along with [a derive
14+
macro](https://docs.rs/daft-derive/0.1.0/daft_derive/derive.Diffable.html) by the same name. This trait represents the
1515
notion of a type for which two members can be simultaneously compared.
1616

1717
## Features
@@ -233,7 +233,7 @@ assert_eq!(
233233

234234
#### Struct diffs
235235

236-
For structs, the \[`Diffable`\]\[macro@Diffable\] derive macro generates
236+
For structs, the [`Diffable`](https://docs.rs/daft-derive/0.1.0/daft_derive/derive.Diffable.html) derive macro generates
237237
a diff type with a field corresponding to each field type. Each field must
238238
implement [`Diffable`](https://docs.rs/daft/0.1.0/daft/diffable/trait.Diffable.html).
239239

@@ -378,7 +378,7 @@ impl Diffable for Identifier {
378378

379379
### Type and lifetime parameters
380380

381-
If a type parameter is specified, the \[`Diffable`\]\[macro@Diffable\] derive
381+
If a type parameter is specified, the [`Diffable`](https://docs.rs/daft-derive/0.1.0/daft_derive/derive.Diffable.html) derive
382382
macro for structs normally requires that the type parameter implement
383383
`Diffable`. This is not required if the field is annotated with
384384
`#[daft(leaf)]`.

release.toml

+3
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ tag-message = "[{{crate_name}}] version {{version}}"
88
tag-name = "daft-{{version}}"
99
publish = false
1010
dependent-version = "upgrade"
11+
pre-release-replacements = [
12+
{ file = "daft-derive/src/lib.rs", search = "^#!\\[doc\\(html_root_url = \"https://docs.rs/daft-derive/.*\"\\)\\]$", replace = "#![doc(html_root_url = \"https://docs.rs/daft-derive/{{version}}\")]", exactly = 1 },
13+
]
1114
pre-release-hook = ["just", "generate-readmes"]

0 commit comments

Comments
 (0)