Rollup merge of #72921 - pickfire:vec-assert, r=Mark-Simulacrum
Rollup merge of #72921 - pickfire:vec-assert, r=Mark-Simulacrum

Add assert to Vec with_capacity docs

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