mirror of
https://github.com/rust-lang/rust
synced 2024-11-02 13:50:48 +00:00
Don't reborrow the target of a write!()
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:
parent
d754722a04
commit
7c3efcc5bb
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,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 a new issue