Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/hashmap/hashmap-capacity-overflow.rs

13 lines
302 B
Rust
Raw Normal View History

[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives
2024-02-16 20:02:50 +00:00
//@ run-fail
//@ error-pattern:capacity overflow
tests: use `needs-subprocess` instead of `ignore-{wasm32,emscripten,sgx}`
2025-01-23 16:36:54 +08:00
//@ needs-subprocess
std: Fix overflow of HashMap's capacity
2014-07-26 04:45:09 +01:00
refactor libcollections as part of collection reform * Moves multi-collection files into their own directory, and splits them into seperate files * Changes exports so that each collection has its own module * Adds underscores to public modules and filenames to match standard naming conventions (that is, treemap::{TreeMap, TreeSet} => tree_map::TreeMap, tree_set::TreeSet) * Renames PriorityQueue to BinaryHeap * Renames SmallIntMap to VecMap * Miscellanious fallout fixes [breaking-change]
2014-10-30 21:25:08 -04:00
use std::collections::hash_map::HashMap;
std: Fix overflow of HashMap's capacity
2014-07-26 04:45:09 +01:00
use std::mem::size_of;
fn main() {
Remove int/uint from libstd/lib.rs
2015-02-27 01:43:55 +01:00
let threshold = usize::MAX / size_of::<(u64, u64, u64)>();
std: Fix overflow of HashMap's capacity
2014-07-26 04:45:09 +01:00
let mut h = HashMap::<u64, u64>::with_capacity(threshold + 100);
h.insert(0, 0);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2378ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API