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:
commit
82dcec7ee4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user