[rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls by GuillaumeGomez · Pull Request #149208 · rust-lang/rust

@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.

T-rustdoc-frontend

Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

labels

Nov 22, 2025

yotamofek

yotamofek

lolbinarycat

@GuillaumeGomez

@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

Nov 24, 2025

bors added a commit that referenced this pull request

Nov 24, 2025
Rollup of 6 pull requests

Successful merges:

 - #148234 (rustdoc: make mergeable crate info more usable)
 - #149201 (Add suggest alternatives for Out-of-range \x escapes)
 - #149208 ([rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls)
 - #149252 (miri: use `tikv-jemalloc-sys` from sysroot)
 - #149255 (Use `let...else` consistently in user-facing diagnostics)
 - #149275 (Fix missing double-quote in `std::env::consts::OS` values)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit that referenced this pull request

Nov 24, 2025
Rollup merge of #149208 - GuillaumeGomez:less-unwraps, r=yotamofek,lolbinarycat

[rustdoc] Make more functions return `fmt::Result` and reduce number of `.unwrap()` calls

Following our discussion in #149028 (comment), this PR makes more function return `fmt::Result`, allowing to use `?` a lot more, and also reducing number of `.unwrap()` calls.

r? `@lolbinarycat`

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Nov 25, 2025

github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request

Nov 27, 2025