@@ -202,51 +202,6 @@ crate other than the source repository or API documentation. Do not make
202
202
` homepage ` redundant with either the ` documentation ` or ` repository ` values. For
203
203
example, serde sets ` homepage ` to * https://serde.rs * , a dedicated website.
204
204
205
- [ C-HTML-ROOT ] : #c-html-root
206
- <a id =" c-html-root " ></a >
207
- ### Crate sets html_root_url attribute (C-HTML-ROOT)
208
-
209
- <!--
210
- Remove this guideline once rustdoc links no-deps documentation with no
211
- html_root_url to docs.rs by default.
212
- https://github.com/rust-lang/rust/issues/42301
213
- -->
214
-
215
- It should point to ` "https://docs.rs/CRATE/MAJOR.MINOR.PATCH" ` ,
216
- assuming the crate uses docs.rs for its primary API documentation.
217
-
218
- The ` html_root_url ` attribute tells rustdoc how to create URLs to
219
- items in the crate when compiling downstream crates. Without it, links
220
- in the documentation of crates that depend on your crate will be
221
- incorrect.
222
-
223
- ``` rust
224
- #![doc(html_root_url = " https://docs.rs/log/0.3.8" )]
225
- ```
226
-
227
- Because this URL contains an exact version number, it must be kept in
228
- sync with the version number in ` Cargo.toml ` . The [ ` version-sync ` ]
229
- crate can help with this by letting you add an integration test that
230
- fails if the ` html_root_url ` version number is out of sync with the
231
- crate version.
232
-
233
- [ `version-sync` ] : https://crates.io/crates/version-sync
234
-
235
- If you do not like that mechanism, it is recommended to add a comment
236
- to the ` Cargo.toml ` version key reminding yourself to keep the two
237
- updated together, like:
238
-
239
- ``` toml
240
- version = " 0.3.8" # remember to update html_root_url
241
- ```
242
-
243
- For documentation hosted outside of docs.rs, the value for ` html_root_url ` is
244
- correct if appending the crate name + index.html takes you to the documentation
245
- of the crate's root module. For example if the documentation of the root module
246
- is located at ` "https://api.rocket.rs/rocket/index.html" ` then the
247
- ` html_root_url ` would be ` "https://api.rocket.rs" ` .
248
-
249
-
250
205
<a id =" c-relnotes " ></a >
251
206
## Release notes document all significant changes (C-RELNOTES)
252
207
0 commit comments