Skip to content

Commit

Permalink
Add warning about varying hashes/orderings
Browse files Browse the repository at this point in the history
  • Loading branch information
sdleffler authored Jan 17, 2017
1 parent 6365c43 commit b08ab1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libcore/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ impl Any+Send {
///
/// A `TypeId` is currently only available for types which ascribe to `'static`,
/// but this limitation may be removed in the future.
///
/// While `TypeId` implements `Hash`, `PartialOrd`, and `Ord`, it is worth
/// noting that the hashes and ordering will vary between Rust releases. Beware
/// of relying on them outside of your code!
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct TypeId {
Expand Down

0 comments on commit b08ab1e

Please sign in to comment.