Skip to content

rustdoc is parsing email link literals in docs as intradoc links in the latest nightly #83859

Description

@lopopolo

I tried this code:

/// Information about an Artichoke build.
///
/// Implementations of this trait are used to set global Ruby constants that
/// describe the current build.
pub trait ReleaseMetadata {
    /// Copyright information.
    ///
    /// This value will populate the `RUBY_COPYRIGHT` constant.
    ///
    /// # Examples
    ///
    /// > artichoke - Copyright (c) 2019-2020 Ryan Lopopolo <rjl@hyperbo.la>
    fn ruby_copyright(&self) -> &str;
}

I expected to see this happen: rustdoc parses the link as an email address and renders it as a mailto: link.

Instead, this happened:

error: unknown disambiguator `rjl`
  --> artichoke-core/src/release_metadata.rs:18:62
   |
18 |     /// > artichoke - Copyright (c) 2019-2020 Ryan Lopopolo <rjl@hyperbo.la>
   |                                                              ^^^
   |
   = note: requested on the command line with `-D rustdoc::broken-intra-doc-links`

Meta

/usr/share/rust/.cargo/bin/rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/runner/.rustup

info: syncing channel updates for '1.51.0-x86_64-unknown-linux-gnu'
info: latest update on 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'rust-std'
info: installing component 'rustc'
1.51.0-x86_64-unknown-linux-gnu (overridden by '/home/runner/work/artichoke/artichoke/rust-toolchain')
rustc 1.51.0 (2fd73fabe 2021-03-23)
/usr/share/rust/.cargo/bin/rustup -V
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.51.0 (2fd73fabe 2021-03-23)`
Installed rustup 1.23.1 support profiles
/usr/share/rust/.cargo/bin/rustup set profile minimal
info: profile set to 'minimal'
/usr/share/rust/.cargo/bin/rustup toolchain install nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-04-04, rust version 1.53.0-nightly (0b417ab5c 2021-04-03)
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'rust-std'
info: installing component 'rustc'

  nightly-x86_64-unknown-linux-gnu installed - rustc 1.53.0-nightly (0b417ab5c 2021-04-03)

info: checking for self-updates
/usr/share/rust/.cargo/bin/rustup override set nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: override toolchain for '/home/runner/work/artichoke/artichoke' set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.53.0-nightly (0b417ab5c 2021-04-03)

(from a GitHub Actions run, the latest nightly won't install on my Arch box due to broken components)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.P-mediumMedium priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions