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
This commit is contained in:
bors 2015-04-03 07:13:51 +00:00
commit 82dcec7ee4

View File

@ -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