about summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <liehr.exchange@gmx.net>2022-03-29 19:30:54 +0200
committerLeón Orell Valerian Liehr <liehr.exchange@gmx.net>2022-04-12 15:38:39 +0200
commit8de453a8c6a26e43876def2d757bec40ed9b2767 (patch)
tree356dab604c87c625d1866a4e2fc8b594ed75caa5 /src/librustdoc/html/format.rs
parent2a83fbc42a9bb6bfdb8d3fb4ecce83fb410d7642 (diff)
downloadrust-8de453a8c6a26e43876def2d757bec40ed9b2767.tar.gz
rust-8de453a8c6a26e43876def2d757bec40ed9b2767.zip
rustdoc: discr. required+provided assoc consts+tys
Diffstat (limited to 'src/librustdoc/html/format.rs')
-rw-r--r--src/librustdoc/html/format.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 5c59609d5b8..55b0028180f 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -527,6 +527,21 @@ crate enum HrefError {
     /// This item is known to rustdoc, but from a crate that does not have documentation generated.
     ///
     /// This can only happen for non-local items.
+    ///
+    /// # Example
+    ///
+    /// Crate `a` defines a public trait and crate `b` – the target crate that depends on `a` –
+    /// implements it for a local type.
+    /// We document `b` but **not** `a` (we only _build_ the latter – with `rustc`):
+    ///
+    /// ```sh
+    /// rustc a.rs --crate-type=lib
+    /// rustdoc b.rs --crate-type=lib --extern=a=liba.rlib
+    /// ```
+    ///
+    /// Now, the associated items in the trait impl want to link to the corresponding item in the
+    /// trait declaration (see `html::render::assoc_href_attr`) but it's not available since their
+    /// *documentation (was) not built*.
     DocumentationNotBuilt,
     /// This can only happen for non-local items when `--document-private-items` is not passed.
     Private,