Rollup merge of #31296 - steveklabnik:gh31249, r=alexcrichton
Rollup merge of #31296 - steveklabnik:gh31249, r=alexcrichton

Rustdoc will automatically wrap things in main, but this doesn't work
here.

Fixes #31249

aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust