Closed
Description
In the following code from rust/compiler/rustc_index/src/bit_set.rs, self.words should resize with from.words.len() instead of from.domain_size.
fn clone_from(&mut self, from: &Self) {
if self.domain_size != from.domain_size {
self.words.resize(from.domain_size, 0);
self.domain_size = from.domain_size;
}
self.words.copy_from_slice(&from.words);
}
Otherwise, this function will panic when calling 'copy_from_slice' because of the mismatched slice length.