Commit cfb9d75e authored by Ian Jackson's avatar Ian Jackson
Browse files

tor-netdoc: Add crate:: to docs xrefs to avoid broken links

Apparently, it is only correct to write
   [`NetdocParseableUnverified`](derive_deftly_template_NetdocParseableUnverified),
*after* the definition of that template.  Before then, the macro isn't
in scope.

Worse, rustdoc just treats it as a filename and doesn't spot the link,
so you don't get any kind of warning.  I think this is an upstream bug,
  https://github.com/rust-lang/rust/issues/157304

I found rustdoc's behaviour capricious.  I don't intend to go through
the arti tree right now looking for similar patterns.  Instead let's
hope the upstream bug gets fixed, and in the meantime do this crate::
thing when we notice we need it.
parent b64c8424
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -509,7 +509,7 @@ define_derive_deftly! {
    /// To handle signed documents define two structures:
    ///
    ///  * `Foo`, containing only the content, not the signatures.
    ///    Derive [`NetdocParseableUnverified`](derive_deftly_template_NetdocParseableUnverified).
    ///    Derive [`NetdocParseableUnverified`](crate::derive_deftly_template_NetdocParseableUnverified).
    ///  * `FooSignatures`, containing only the signatures.
    ///    Derive `NetdocParseableSignatures`.
    ///
@@ -693,7 +693,7 @@ define_derive_deftly! {
    ///
    /// This signatures sub-document will typically be included in a
    /// `FooUnverified` struct derived with
    /// [`NetdocParseableUnverified`](derive_deftly_template_NetdocParseableUnverified),
    /// [`NetdocParseableUnverified`](crate::derive_deftly_template_NetdocParseableUnverified),
    /// rather than included anywhere manually.
    ///
    /// ### Expected input structure