Skip to content

Commit 044470a

Browse files
committed
Remove hashbrown usage
drain_filter is now supported on nightly
1 parent 2d250ff commit 044470a

File tree

4 files changed

+7
-26
lines changed

4 files changed

+7
-26
lines changed

Cargo.lock

Lines changed: 1 addition & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ byteorder = "1.2.7"
2323
indexmap = "1.0.2"
2424
cfg-if = "0.1.10"
2525
libloading = { version = "0.6.0", optional = true }
26-
hashbrown = "0.9.0"
2726

2827
# Uncomment to use local checkout of cranelift
2928
#[patch."https://github.com/bytecodealliance/wasmtime/"]

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
type_alias_impl_trait,
55
associated_type_bounds,
66
never_type,
7-
try_blocks
7+
try_blocks,
8+
hash_drain_filter,
89
)]
910
#![warn(rust_2018_idioms)]
1011
#![warn(unused_lifetimes)]

src/optimize/stack2reg.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ use std::collections::BTreeMap;
1313
use std::fmt;
1414
use std::ops::Not;
1515

16-
use rustc_data_structures::fx::{FxHashSet, FxHasher};
16+
use rustc_data_structures::fx::FxHashSet;
1717

1818
use cranelift_codegen::cursor::{Cursor, FuncCursor};
1919
use cranelift_codegen::ir::immediates::Offset32;
2020
use cranelift_codegen::ir::{InstructionData, Opcode, ValueDef};
2121

22-
use hashbrown::HashSet;
23-
use std::hash::BuildHasherDefault;
24-
2522
use crate::prelude::*;
2623

2724
/// Workaround for `StackSlot` not implementing `Ord`.
@@ -48,9 +45,9 @@ impl Ord for OrdStackSlot {
4845

4946
#[derive(Debug, Default)]
5047
struct StackSlotUsage {
51-
stack_addr: HashSet<Inst, BuildHasherDefault<FxHasher>>,
52-
stack_load: HashSet<Inst, BuildHasherDefault<FxHasher>>,
53-
stack_store: HashSet<Inst, BuildHasherDefault<FxHasher>>,
48+
stack_addr: FxHashSet<Inst>,
49+
stack_load: FxHashSet<Inst>,
50+
stack_store: FxHashSet<Inst>,
5451
}
5552

5653
impl StackSlotUsage {

0 commit comments

Comments
 (0)