about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-05-22 18:36:22 -0700
committerbors <bors@rust-lang.org>2014-05-22 18:36:22 -0700
commitec0258a381b88b5574e3f8ce72ae553ac3a574b7 (patch)
tree86f54224567ed10ceb5aed232d64f81fbcb8d994 /src/rustllvm/RustWrapper.cpp
parenta0960a12239a473c2608e068824f565d6cd63966 (diff)
parent3d268fe6662a8fc659a08e6e038e1e0ac89ddfb0 (diff)
downloadrust-ec0258a381b88b5574e3f8ce72ae553ac3a574b7.tar.gz
rust-ec0258a381b88b5574e3f8ce72ae553ac3a574b7.zip
auto merge of #14314 : alexcrichton/rust/deriving-hash, r=brson
One of the long-term goals of the libstd facade is to move the collections
library underneath the standard library. This would imply that libcollections
today would invert its dependency with libstd.

One of the primary blockers for doing this is the HashMap collection. Of its two
major dependencies, hashing and randomness, this commit is the first step in
dealing with hashing.

When moving the hash module beneath libstd, it must break its primary dependence
on the io::Writer trait (used as the hashing state). The proposed strategy for
breaking this dependence is taking a similar path as core::fmt, which is to have
the hash module define its own "writer trait". This trait would be similar to
std::io::Writer, except that it would not return errors and it would have fewer
convenience methods.

The Hash trait today has its type parameter behind a feature gate (default type
parameters), so this pending change will likely break no code which hasn't opted
in to the feature gate. The SipState struct will lose its implementation of
io::Writer, but it will regain similar methods for dealing with writing data.

This change specifically prepares for the hash migration by modifying
deriving(Hash) to use the std::hash::Writer bound instead of the std::io::Writer
bound. This bound is currently wired to std::io::Writer, but after a snapshot it
will have no need to be wired to the io writer trait.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions