Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
12
tests/ui/hashmap/hashmap-capacity-overflow.rs
Normal file
12
tests/ui/hashmap/hashmap-capacity-overflow.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
// run-fail
|
||||
// error-pattern:capacity overflow
|
||||
// ignore-emscripten no processes
|
||||
|
||||
use std::collections::hash_map::HashMap;
|
||||
use std::mem::size_of;
|
||||
|
||||
fn main() {
|
||||
let threshold = usize::MAX / size_of::<(u64, u64, u64)>();
|
||||
let mut h = HashMap::<u64, u64>::with_capacity(threshold + 100);
|
||||
h.insert(0, 0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue