Skip to content

Commit

Permalink
move object safety test to library/core
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheemdev committed Aug 15, 2021
1 parent 481b282 commit 58f988f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 8 additions & 1 deletion library/core/tests/hash/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod sip;

use std::default::Default;
use std::hash::{Hash, Hasher};
use std::hash::{BuildHasher, Hash, Hasher};
use std::rc::Rc;

struct MyHasher {
Expand Down Expand Up @@ -139,3 +139,10 @@ fn test_indirect_hasher() {
}
assert_eq!(hasher.hash, 5);
}

#[test]
fn test_build_hasher_object_safe() {
use std::collections::hash_map::{DefaultHasher, RandomState};

let _: &dyn BuildHasher<Hasher = DefaultHasher> = &RandomState::new();
}
10 changes: 0 additions & 10 deletions src/test/ui/build-hasher-object-safe.rs

This file was deleted.

0 comments on commit 58f988f

Please sign in to comment.