We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3522676 + 27e1b06 commit c07998eCopy full SHA for c07998e
library/alloc/src/string.rs
@@ -2196,6 +2196,9 @@ pub trait ToString {
2196
/// since `fmt::Write for String` never returns an error itself.
2197
#[stable(feature = "rust1", since = "1.0.0")]
2198
impl<T: fmt::Display + ?Sized> ToString for T {
2199
+ // A common guideline is to not inline generic functions. However,
2200
+ // remove `#[inline]` from this method causes non-negligible regression.
2201
+ // See <https://github.com/rust-lang/rust/pull/74852> as last attempt try to remove it.
2202
#[inline]
2203
default fn to_string(&self) -> String {
2204
use fmt::Write;
0 commit comments