From 108b8b6dc707775bd54aeea7820e0d473f556718 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 18 Jun 2014 20:25:36 +0200 Subject: Deprecate the bytes!() macro. Replace its usage with byte string literals, except in `bytes!()` tests. Also add a new snapshot, to be able to use the new b"foo" syntax. The src/etc/2014-06-rewrite-bytes-macros.py script automatically rewrites `bytes!()` invocations into byte string literals. Pass it filenames as arguments to generate a diff that you can inspect, or `--apply` followed by filenames to apply the changes in place. Diffs can be piped into `tip` or `pygmentize -l diff` for coloring. --- src/libdebug/repr.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libdebug') diff --git a/src/libdebug/repr.rs b/src/libdebug/repr.rs index d27b0f0de7e..4744d92436f 100644 --- a/src/libdebug/repr.rs +++ b/src/libdebug/repr.rs @@ -75,13 +75,13 @@ macro_rules! num_repr(($ty:ident, $suffix:expr) => (impl Repr for $ty { fn write_repr(&self, writer: &mut io::Writer) -> io::IoResult<()> { let s = self.to_str(); writer.write(s.as_bytes()).and_then(|()| { - writer.write(bytes!($suffix)) + writer.write($suffix) }) } })) -num_repr!(f32, "f32") -num_repr!(f64, "f64") +num_repr!(f32, b"f32") +num_repr!(f64, b"f64") // New implementation using reflect::MovePtr -- cgit 1.4.1-3-g733a5