`Hash::hash`'s type parameter should be `?Sized`
apasel422 opened this issue · 3 comments
apasel422 commented
The Hasher
trait is not Sized
, but Hash::hash
is defined to take a sized type parameter. This prevents code like the following from working:
use std::hash::{Hash, Hasher};
fn bar(hasher: &mut Hasher) {
1.hash(hasher);
}
fn main() {}
apasel422 commented
Changing this now would be a breaking change, however, as all manual implementors would need to be updated.
alexcrichton commented
If this requires changing all implementors I think our hands may unfortunately be tied on this one
apasel422 commented
Yeah, I guess this isn't going to be possible.