Avoid direct Drop::drop method link in destructor docs#2261
Avoid direct Drop::drop method link in destructor docs#2261P8L1 wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
r? petrochenkov |
|
Failed to set assignee to
|
1 similar comment
|
Failed to set assignee to
|
|
r? @ehuss |
|
@rustbot label +F-pin_ergonomics |
|
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. |
|
Discussing this at rust-lang/rust#144537 (comment). |
|
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 |
This avoids linking directly to
core::ops::Drop::dropfrom 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::dropbecomes a provided/default method, so the old required-method anchor is no longer generated, and linkchecker fails forreference/destructors.htmlandreference/print.html.The docs still mention
<T as core::ops::Drop>::drop, but now link to theDroptrait 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.