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: use unicode-aware checks for redundant explicit link fastpath #115070

Merged

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Aug 21, 2023

Fixes #115064
Fixes #115062
Fixes #115116

@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@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. labels Aug 21, 2023
@@ -98,13 +98,8 @@ fn check_redundant_explicit_link<'md>(

let explicit_link = dest.to_string();
let display_link = link_data.resolvable_link.clone()?;
let explicit_len = explicit_link.len();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same logic in collect_infra_links.rs should be replaced with new logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I've figured out how to trigger that code, fixed it, and added a test case:

/// […………………………][Broken3]
pub struct Broken4 {}

/// [Broken3][…………………………]
pub struct Broken5 {}

@notriddle notriddle force-pushed the notriddle/utf8-redundant-explicit-links branch from 223a492 to 0164c06 Compare August 21, 2023 21:19
@rust-log-analyzer

This comment has been minimized.

@notriddle notriddle force-pushed the notriddle/utf8-redundant-explicit-links branch from 0164c06 to 3df9b4d Compare August 21, 2023 21:25
@fmease
Copy link
Member

fmease commented Aug 22, 2023

This should also fix #115062, right?

@notriddle
Copy link
Contributor Author

notriddle commented Aug 22, 2023

Yes, it will.

@GuillaumeGomez
Copy link
Member

Nice thanks!

@bors r=GuillaumeGomez,ChAoSUnItY

@bors
Copy link
Contributor

bors commented Aug 22, 2023

📌 Commit 3df9b4d has been approved by GuillaumeGomez,ChAoSUnItY

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 22, 2023
@notriddle notriddle assigned GuillaumeGomez and unassigned jsha Aug 22, 2023
@bors
Copy link
Contributor

bors commented Aug 23, 2023

⌛ Testing commit 3df9b4d with merge c6f5495...

@bors
Copy link
Contributor

bors commented Aug 23, 2023

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez,ChAoSUnItY
Pushing c6f5495 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 23, 2023
@bors bors merged commit c6f5495 into rust-lang:master Aug 23, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Aug 23, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c6f5495): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

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)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
2.0% [1.5%, 3.0%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

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: 634.642s -> 635.573s (0.15%)
Artifact size: 347.07 MiB -> 347.08 MiB (0.00%)

@notriddle notriddle deleted the notriddle/utf8-redundant-explicit-links branch August 23, 2023 12:31
@notriddle notriddle added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 24, 2023
@notriddle
Copy link
Contributor Author

Nominated for beta by @notriddle and @GuillaumeGomez

@apiraino
Copy link
Contributor

apiraino commented Sep 1, 2023

Beta backport approved

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 1, 2023
@cuviper cuviper mentioned this pull request Sep 1, 2023
@cuviper cuviper modified the milestones: 1.74.0, 1.73.0 Sep 1, 2023
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 1, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2023
[beta] backports

- Contents of reachable statics is reachable rust-lang#115114
- Revert "Suggest using `Arc` on `!Send`/`!Sync` types" rust-lang#115311
- Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen rust-lang#115236
- Do not forget to pass DWARF fragment information to LLVM. rust-lang#115139
- rustdoc: use unicode-aware checks for redundant explicit link fastpath rust-lang#115070

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet