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

Improve handling of rustdoc lints when used with raw doc fragments. #136400

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

lolbinarycat
Copy link
Contributor

  1. rustdoc::bare_urls no longer outputs incoherent suggestions if source_span_for_markdown_range returns None, instead outputting no suggestion
  2. source_span_for_markdown_range has one more heuristic, so it will return None less often.
  3. add ui test to make sure we don't emit nonsense suggestions.

fixes #135851

@rustbot
Copy link
Collaborator

rustbot commented Feb 1, 2025

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 1, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the rustdoc-link-lint-135851 branch from a9a435b to c6d7696 Compare February 3, 2025 19:23
@lolbinarycat
Copy link
Contributor Author

@fmease what module do you want me to move source_span_to_markdown_range into, or should that be left for a followup PR?

@lolbinarycat
Copy link
Contributor Author

@fmease reminder to look at this.

@lolbinarycat
Copy link
Contributor Author

@fmease it's been a week, are you going to get to this, or should I reroll reviewers?

@fmease fmease closed this Apr 2, 2025
@fmease fmease reopened this Apr 2, 2025
@fmease
Copy link
Member

fmease commented Apr 2, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 2, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 2, 2025
…1, r=<try>

Improve handling of rustdoc lints when used with raw doc fragments.

1. `rustdoc::bare_urls` no longer outputs incoherent suggestions if `source_span_for_markdown_range` returns None, instead outputting no suggestion
2. `source_span_for_markdown_range` has one more heuristic, so it will return `None` less often.
3. add ui test to make sure we don't emit nonsense suggestions.

fixes rust-lang#135851
@bors
Copy link
Collaborator

bors commented Apr 2, 2025

⌛ Trying commit c6d7696 with merge 75eefd1...

@bors
Copy link
Collaborator

bors commented Apr 2, 2025

☀️ Try build successful - checks-actions
Build commit: 75eefd1 (75eefd14476b7cd550f9b8b82f8fccfa949bf30e)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (75eefd1): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -4.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.0% [-5.0%, -3.0%] 2
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 776.227s -> 775.389s (-0.11%)
Artifact size: 365.99 MiB -> 365.98 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 2, 2025
@lolbinarycat
Copy link
Contributor Author

@fmease all recommended changes added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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's automatic link suggestion is syntactically invalid when the link is in a #[doc] attribute
7 participants