-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
869 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
#[macro_use] | ||
extern crate ptr_eq_macro; | ||
|
||
pub mod rc; | ||
|
||
pub use ptr_eq_macro::PtrEq; | ||
|
||
/// A marker trait for types that implement by-address comparisons, equality tests, | ||
/// and hashes. | ||
pub unsafe trait PtrEq { } | ||
|
||
#[derive(PtrEq)] | ||
pub struct Test(i32); | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
#[test] | ||
fn it_works() { | ||
assert_eq!(2 + 2, 4); | ||
} | ||
} | ||
pub unsafe trait PtrEq {} |
Oops, something went wrong.