Skip to content

Commit df0a459

Browse files
committed
Add String::write_fmt with #[may_ignore].
1 parent 5384ba4 commit df0a459

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

library/alloc/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
#![feature(int_bits_const)]
107107
#![feature(lang_items)]
108108
#![feature(layout_for_ptr)]
109+
#![cfg_attr(not(bootstrap), feature(may_ignore))]
109110
#![feature(maybe_uninit_ref)]
110111
#![feature(negative_impls)]
111112
#![feature(never_type)]

library/alloc/src/string.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,14 @@ impl String {
15871587
let slice = self.vec.into_boxed_slice();
15881588
unsafe { from_boxed_utf8_unchecked(slice) }
15891589
}
1590+
1591+
#[doc(hidden)]
1592+
#[inline]
1593+
#[cfg_attr(not(bootstrap), may_ignore)]
1594+
#[stable(feature = "string_write_fmt", since = "1.49.0")]
1595+
pub fn write_fmt(mut self: &mut Self, args: fmt::Arguments<'_>) -> fmt::Result {
1596+
fmt::write(&mut self, args)
1597+
}
15901598
}
15911599

15921600
impl FromUtf8Error {

0 commit comments

Comments
 (0)