Skip to content

Commit 82dcec7

Browse files
committed
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
2 parents fc98b19 + 7c3efcc commit 82dcec7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ macro_rules! try {
182182
/// ```
183183
#[macro_export]
184184
macro_rules! write {
185-
($dst:expr, $($arg:tt)*) => ((&mut *$dst).write_fmt(format_args!($($arg)*)))
185+
($dst:expr, $($arg:tt)*) => ($dst.write_fmt(format_args!($($arg)*)))
186186
}
187187

188188
/// Equivalent to the `write!` macro, except that a newline is appended after

0 commit comments

Comments
 (0)