diff options
| author | Daniel Brooks <db48x@db48x.net> | 2014-05-12 02:04:07 -0700 |
|---|---|---|
| committer | Daniel Brooks <db48x@db48x.net> | 2014-05-14 00:48:02 -0700 |
| commit | 9eb723d00081938ebc6306a7cb73209e45140c95 (patch) | |
| tree | b1fc0342f6e1508ad00414c1496b64115da1e2e5 /src/libstd | |
| parent | 72fc4a5eb72b8ba96dba66400c7eecac93b0b252 (diff) | |
| download | rust-9eb723d00081938ebc6306a7cb73209e45140c95.tar.gz rust-9eb723d00081938ebc6306a7cb73209e45140c95.zip | |
define Eq,TotalEq,Ord,TotalOrd for &mut T
Also Show, which is useful in assertions. Fixes #14074
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/fmt/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index b4bb6236f08..3ba013df278 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -1124,6 +1124,9 @@ impl<T: Show> Show for Box<T> { impl<'a, T: Show> Show for &'a T { fn fmt(&self, f: &mut Formatter) -> Result { secret_show(*self, f) } } +impl<'a, T: Show> Show for &'a mut T { + fn fmt(&self, f: &mut Formatter) -> Result { secret_show(*self, f) } +} impl Bool for bool { fn fmt(&self, f: &mut Formatter) -> Result { |
