rustdoc: pass through --cfg to rustc

Closes #10623