about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-03 07:13:51 +0000
committerbors <bors@rust-lang.org>2015-04-03 07:13:51 +0000
commit82dcec7ee4a8a71fdfb8e8771ae6785261ec1d5b (patch)
treea3c693783ebbfa6849db1aeacc4fc1295acbbf09 /src/libcore
parentfc98b19cf72ea45851ebb7b28af160be92b19128 (diff)
parent7c3efcc5bb260234fc163340c9fd7aad3d8d780e (diff)
downloadrust-82dcec7ee4a8a71fdfb8e8771ae6785261ec1d5b.tar.gz
rust-82dcec7ee4a8a71fdfb8e8771ae6785261ec1d5b.zip
Auto merge of #23934 - lfairy:write-no-deref, r=alexcrichton
This means passing in e.g. a `Vec<u8>` or `String` will work as
intended, rather than deref-ing to `&mut [u8]` or `&mut str`.

[breaking-change]

Closes #23768
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/macros.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 751bd7353e4..c21898d088d 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -182,7 +182,7 @@ macro_rules! try {
 /// ```
 #[macro_export]
 macro_rules! write {
-    ($dst:expr, $($arg:tt)*) => ((&mut *$dst).write_fmt(format_args!($($arg)*)))
+    ($dst:expr, $($arg:tt)*) => ($dst.write_fmt(format_args!($($arg)*)))
 }
 
 /// Equivalent to the `write!` macro, except that a newline is appended after