Skip to content

Avoid direct Drop::drop method link in destructor docs#2261

Closed
P8L1 wants to merge 1 commit intorust-lang:masterfrom
P8L1:fix-drop-link
Closed

Avoid direct Drop::drop method link in destructor docs#2261
P8L1 wants to merge 1 commit intorust-lang:masterfrom
P8L1:fix-drop-link

Conversation

@P8L1
Copy link
Copy Markdown

@P8L1 P8L1 commented May 5, 2026

This avoids linking directly to core::ops::Drop::drop from the destructor docs.

That direct method link can resolve to a rustdoc method-fragment anchor such as #tymethod.drop. In rust-lang/rust#144537, Drop::drop becomes a provided/default method, so the old required-method anchor is no longer generated, and linkchecker fails for reference/destructors.html and reference/print.html.

The docs still mention <T as core::ops::Drop>::drop, but now link to the Drop trait page instead of relying on a method-specific fragment.

This is the Reference-side fix needed for the linkchecker failure in rust-lang/rust#144537.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label May 5, 2026
@P8L1
Copy link
Copy Markdown
Author

P8L1 commented May 5, 2026

r? petrochenkov

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 5, 2026

Failed to set assignee to petrochenkov: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

1 similar comment
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 5, 2026

Failed to set assignee to petrochenkov: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@P8L1
Copy link
Copy Markdown
Author

P8L1 commented May 5, 2026

r? @ehuss

@P8L1
Copy link
Copy Markdown
Author

P8L1 commented May 5, 2026

@rustbot label +F-pin_ergonomics

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 5, 2026

Error: Label F-pin_ergonomics can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@ehuss
Copy link
Copy Markdown
Contributor

ehuss commented May 5, 2026

Discussing this at rust-lang/rust#144537 (comment).

@P8L1
Copy link
Copy Markdown
Author

P8L1 commented May 5, 2026

Thanks, that makes sense. I agree this is cleaner than trying to fix the generated Reference link for a stage1 rustdoc/std mismatch.

I’ll prepare a small PR with the x86_64-gnu-llvm3.sh linkchecker skip.

@P8L1 P8L1 closed this May 6, 2026
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants