Rollup merge of #41535 - steveklabnik:gh37746, r=alexcrichton
Rollup merge of #41535 - steveklabnik:gh37746, r=alexcrichton

Fix up vec guarnatee around capacity

Fixes #37746

r? @rust-lang/libs

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