diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-11-01 18:06:31 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-01-04 14:44:12 -0800 |
| commit | 3b1862a82f04f8f5bcb197715d2ff506c6cdecc3 (patch) | |
| tree | 0057a02e6d56e9bea0357d649a420b6e66b5be71 /src/libstd/hash.rs | |
| parent | 18cef3fad47f90c6c5ec1f2ad4dbc12b86b7ee7e (diff) | |
| download | rust-3b1862a82f04f8f5bcb197715d2ff506c6cdecc3.tar.gz rust-3b1862a82f04f8f5bcb197715d2ff506c6cdecc3.zip | |
Don't allow newtype structs to be dereferenced. #6246
Diffstat (limited to 'src/libstd/hash.rs')
| -rw-r--r-- | src/libstd/hash.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/hash.rs b/src/libstd/hash.rs index 4782bb5dd13..d1b1273d5e0 100644 --- a/src/libstd/hash.rs +++ b/src/libstd/hash.rs @@ -309,7 +309,8 @@ mod tests { struct Bytes<'a>(&'a [u8]); impl<'a> IterBytes for Bytes<'a> { fn iter_bytes(&self, _lsb0: bool, f: |&[u8]| -> bool) -> bool { - f(**self) + let Bytes(v) = *self; + f(v) } } |
