Skip to content

Commit 5c457df

Browse files
committed
Remove html_root_url guideline
Docs.rs has found a way to infer html_root_url for crates and their dependencies, so manually setting html_root_url is no longer important.
1 parent c3e384f commit 5c457df

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

src/checklist.md

-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
- authors, description, license, homepage, documentation, repository,
3939
readme, keywords, categories
4040
- [ ] Cargo.toml documentation key points to "https://docs.rs/CRATE" ([C-DOCS-RS])
41-
- [ ] Crate sets html_root_url attribute "https://docs.rs/CRATE/VER.SI.ON" ([C-HTML-ROOT])
4241
- [ ] Release notes document all significant changes ([C-RELNOTES])
4342
- **Predictability** *(crate enables legible code that acts how it looks)*
4443
- [ ] Smart pointers do not add inherent methods ([C-SMART-PTR])
@@ -106,7 +105,6 @@
106105
[C-LINK]: documentation.html#c-link
107106
[C-METADATA]: documentation.html#c-metadata
108107
[C-DOCS-RS]: documentation.html#c-docs-rs
109-
[C-HTML-ROOT]: documentation.html#c-html-root
110108
[C-RELNOTES]: documentation.html#c-relnotes
111109

112110
[C-SMART-PTR]: predictability.html#c-smart-ptr

src/documentation.md

-32
Original file line numberDiff line numberDiff line change
@@ -199,38 +199,6 @@ but should be considered carefully.
199199

200200
[docs.rs]: https://docs.rs
201201

202-
[C-HTML-ROOT]: #c-html-root
203-
<a id="c-html-root"></a>
204-
### Crate sets html_root_url attribute (C-HTML-ROOT)
205-
206-
It should point to `"https://docs.rs/CRATE/MAJOR.MINOR.PATCH"`,
207-
assuming the crate uses docs.rs for its primary API documentation.
208-
209-
The `html_root_url` attribute tells rustdoc how to create URLs to
210-
items in the crate when compiling downstream crates. Without it, links
211-
in the documentation of crates that depend on your crate will be
212-
incorrect.
213-
214-
```rust
215-
#![doc(html_root_url = "https://docs.rs/log/0.3.8")]
216-
```
217-
218-
Because this URL contains an exact version number, it must be kept in
219-
sync with the version number in `Cargo.toml`. The [`version-sync`]
220-
crate can help with this by letting you add an integration test that
221-
fails if the `html_root_url` version number is out of sync with the
222-
crate version.
223-
224-
[`version-sync`]: https://crates.io/crates/version-sync
225-
226-
If you do not like that mechanism, it is recommended to add a comment
227-
to the `Cargo.toml` version key reminding yourself to keep the two
228-
updated together, like:
229-
230-
```toml
231-
version = "0.3.8" # remember to update html_root_url
232-
```
233-
234202

235203
<a id="c-relnotes"></a>
236204
## Release notes document all significant changes (C-RELNOTES)

0 commit comments

Comments
 (0)