Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustdoc will report warnings multiple times for reference links #73264

Closed
jyn514 opened this issue Jun 12, 2020 · 2 comments · Fixed by #76689
Closed

Rustdoc will report warnings multiple times for reference links #73264

jyn514 opened this issue Jun 12, 2020 · 2 comments · Fixed by #76689
Assignees
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Jun 12, 2020

I tried this code:

/// docs [label][with#anchor#error]
pub struct S;

I expected to see this happen: rustdoc outputs a single warning that only 1 anchor is allowed

Instead, this happened: rustdoc outputs the same warning twice in a row:

warning: `[with#anchor#error]` has an issue with the link anchor.
  --> $DIR/reference-link-has-one-warning.rs:3:18
   |
LL | /// docs [label][with#anchor#error]
   |                  ^^^^^^^^^^^^^^^^^ only one `#` is allowed in a link
   |
   = note: `#[warn(intra_doc_link_resolution_failure)]` on by default

warning: `[with#anchor#error]` has an issue with the link anchor.
  --> $DIR/reference-link-has-one-warning.rs:3:18
   |
LL | /// docs [label][with#anchor#error]
   |                  ^^^^^^^^^^^^^^^^^ only one `#` is allowed in a link

warning: 2 warnings emitted

Meta

rustc --version --verbose:

<version>

@rustbot modify labels: T-rustdoc A-intra-doc-links

@jyn514 jyn514 added the C-bug Category: This is a bug. label Jun 12, 2020
@rustbot rustbot added A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 12, 2020
@jyn514
Copy link
Member Author

jyn514 commented Jun 12, 2020

This is because of pulldown-cmark/pulldown-cmark#444 and has to be fixed upstream AFAIK. I opened a WIP: pulldown-cmark/pulldown-cmark#445

@jyn514

This comment has been minimized.

@rustbot rustbot added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Jun 26, 2020
@jyn514 jyn514 self-assigned this Sep 14, 2020
@jyn514 jyn514 removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Sep 14, 2020
@bors bors closed this as completed in 1fd22fc Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants