Skip to content

Commit ca18f75

Browse files
ibraheemdevMark-Simulacrum
authored andcommitted
move object safety test to library/core
1 parent b842f8c commit ca18f75

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

library/core/tests/hash/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod sip;
22

33
use std::default::Default;
4-
use std::hash::{Hash, Hasher};
4+
use std::hash::{BuildHasher, Hash, Hasher};
55
use std::rc::Rc;
66

77
struct MyHasher {
@@ -139,3 +139,10 @@ fn test_indirect_hasher() {
139139
}
140140
assert_eq!(hasher.hash, 5);
141141
}
142+
143+
#[test]
144+
fn test_build_hasher_object_safe() {
145+
use std::collections::hash_map::{DefaultHasher, RandomState};
146+
147+
let _: &dyn BuildHasher<Hasher = DefaultHasher> = &RandomState::new();
148+
}

src/test/ui/build-hasher-object-safe.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)