2020-04-16 15:50:32 +09:00
|
|
|
//@ run-fail
|
2014-07-26 04:45:09 +01:00
|
|
|
//@ error-pattern:capacity overflow
|
2020-05-08 00:39:02 +09:00
|
|
|
//@ ignore-emscripten no processes
|
2014-07-26 04:45:09 +01:00
|
|
|
|
2014-10-30 21:25:08 -04:00
|
|
|
use std::collections::hash_map::HashMap;
|
2014-07-26 04:45:09 +01:00
|
|
|
use std::mem::size_of;
|
|
|
|
|
|
|
|
fn main() {
|
2015-02-27 01:43:55 +01:00
|
|
|
let threshold = usize::MAX / size_of::<(u64, u64, u64)>();
|
2014-07-26 04:45:09 +01:00
|
|
|
let mut h = HashMap::<u64, u64>::with_capacity(threshold + 100);
|
|
|
|
h.insert(0, 0);
|
|
|
|
}
|