Rollup merge of #140420 - fmease:rustdoc-fix-doctest-heur, r=GuillaumeGomez

rustdoc: Fix doctest heuristic for main fn wrapping

Fixes #140412 which regressed in #140220 that I reviewed. As mentioned in https://github.com/rust-lang/rust/pull/140220#issuecomment-2837061779, at the time I didn't have the time to re-review its latest changes and should've therefore invalided my previous "r=me" and blocked the PR on another review given the fragile nature of the doctest impl. This didn't happen which is my fault.

Contains some other small changes. Diff best reviewed modulo whitespace.
r? ``@GuillaumeGomez``
This commit is contained in:
Guillaume Gomez 2025-05-01 22:27:23 +02:00 committed by GitHub
commit c1e77a7d9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

Diff Content Not Available