Skip to content

Commit 5075174

Browse files
committed
Derives often have very strict bounds
1 parent 3c9258e commit 5075174

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/bootstrap/cache.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,20 @@ impl Ord for Interned<String> {
169169
}
170170
}
171171

172-
#[derive(Default)]
173172
struct TyIntern<T: Hash + Clone + Eq> {
174173
items: Vec<T>,
175174
set: HashMap<T, Interned<T>>,
176175
}
177176

177+
impl<T: Hash + Clone + Eq> Default for TyIntern<T> {
178+
fn default() -> Self {
179+
TyIntern {
180+
items: Vec::new(),
181+
set: Default::default(),
182+
}
183+
}
184+
}
185+
178186
impl<T: Hash + Clone + Eq> TyIntern<T> {
179187
fn intern_borrow<B>(&mut self, item: &B) -> Interned<T>
180188
where

0 commit comments

Comments
 (0)