We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cca950 commit 27e1b06Copy full SHA for 27e1b06
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