diff options
| author | Michael Howell <michael@notriddle.com> | 2022-10-04 20:45:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-04 20:45:12 -0700 |
| commit | 4025e95113a0fd8ba3ab003796381bc992c27929 (patch) | |
| tree | f125233430b66d929ac490f8a091b49391ee63ff /compiler/rustc_errors/src/snippet.rs | |
| parent | d4846f9d03659704af1f6b56bb4278bf843a4627 (diff) | |
| parent | 346a49fe48fd22bd9588d929bc3115016e654801 (diff) | |
| download | rust-4025e95113a0fd8ba3ab003796381bc992c27929.tar.gz rust-4025e95113a0fd8ba3ab003796381bc992c27929.zip | |
Rollup merge of #102574 - aDotInTheVoid:const_collections_with_hasher, r=oli-obk,fee1-dead
Make Hash{Set,Map}::with_hasher unstably const
Makes [`HashMap::with_hasher`](https://doc.rust-lang.org/stable/std/collections/hash_map/struct.HashMap.html#method.with_hasher) and [`HashSet::with_hasher`](https://doc.rust-lang.org/stable/std/collections/hash_set/struct.HashSet.html#method.with_hasher) `const`.
This allows
```rust
static GlobalState: Mutex<HashMap<i32, i32, SomeHasher>> = Mutex::new(HashMap::with_hasher(SomeHasher::new()))
```
Tracking issue: #102575
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions
