Skip to content

[rustdoc] Correctly handle "conflict" between markdown case insensitive link definitions - #161785

Open
GuillaumeGomez wants to merge 2 commits into
rust-lang:mainfrom
GuillaumeGomez:md-case-sensitivity
Open

GuillaumeGomez wants to merge 2 commits into
rust-lang:mainfrom
GuillaumeGomez:md-case-sensitivity

Conversation

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Fixes #80882.

The bug itself was pretty straightforward to fix: in case there is no matching (with case-sensitive check) link definition, we first look if it's an intra-doc link, and if not we fall back to the original (case insensitive) markdown handling (which pulldown-cmark does for us).

The tricky part was to make sure that the intra-doc resolution would not emit warnings in this case, which forced me to add a new emit_error field to a few types to handle it.

r? @lolbinarycat

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Aug 25, 2026
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Fixed typo.

@camelid camelid added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Aug 26, 2026
@camelid

camelid commented Aug 26, 2026

Copy link
Copy Markdown
Member

I think this behavior is likely not straightforward to fix. I'd like us to discuss in our team meeting before we move forward with the PR. Or at least I'd like to take a closer look myself first.

@camelid camelid self-assigned this Aug 26, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

We can do both. ;)

@rust-bors

This comment has been minimized.

@camelid camelid added S-waiting-on-t-rustdoc Status: Awaiting decision from T-rustdoc and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 24, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

It was discussed in today's rustdoc meeting and team seems ok with it.

@rustbot

rustbot commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Let's start the FCP then.

@rfcbot fcp merge

@GuillaumeGomez GuillaumeGomez removed the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Nov 10, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@rfcbot fcp merge

@rust-rfcbot

rust-rfcbot commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

@GuillaumeGomez has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. and removed needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. labels Nov 10, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

As discussed in the last rustdoc team meeting.

This branch has not been deployed

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

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. S-waiting-on-t-rustdoc Status: Awaiting decision from T-rustdoc T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rustdoc: Link references are case-insensitive

6 participants