about summary refs log tree commit diff
path: root/library/alloc/src/string.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-30 00:17:51 +0000
committerbors <bors@rust-lang.org>2020-07-30 00:17:51 +0000
commitfb0b1237b12e949320ccd31a6741f03425fc9a66 (patch)
tree3f49c7e7bb5e814d2a23ab73a105f4fc4a9f49fe /library/alloc/src/string.rs
parent6b269e44322cfca727fd0e793d3a60bd371cbcae (diff)
parentf4f77d756dd29872829b9b59f44a64c0a5e11c61 (diff)
downloadrust-fb0b1237b12e949320ccd31a6741f03425fc9a66.tar.gz
rust-fb0b1237b12e949320ccd31a6741f03425fc9a66.zip
Auto merge of #74929 - Manishearth:rollup-z2vflrp, r=Manishearth
Rollup of 10 pull requests

Successful merges:

 - #74742 (Remove links to rejected errata 4406 for RFC 4291)
 - #74819 (Point towards `format_spec`; it is in other direction)
 - #74852 (Explain why inlining default ToString impl)
 - #74869 (Make closures and generators a must use types)
 - #74873 (symbol mangling: use ty::print::Print for consts)
 - #74902 (Remove deprecated unstable `{Box,Rc,Arc}::into_raw_non_null` functions)
 - #74904 (Fix some typos in src/librustdoc/clean/auto_trait.rs)
 - #74910 (fence docs: fix example Mutex)
 - #74912 (Fix broken link in unstable book `plugin`)
 - #74927 (Change the target data layout to specify more values)

Failed merges:

r? @ghost
Diffstat (limited to 'library/alloc/src/string.rs')
-rw-r--r--library/alloc/src/string.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index 05398ca68c8..d7d7b6bd157 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -2196,6 +2196,9 @@ pub trait ToString {
 /// since `fmt::Write for String` never returns an error itself.
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: fmt::Display + ?Sized> ToString for T {
+    // A common guideline is to not inline generic functions. However,
+    // remove `#[inline]` from this method causes non-negligible regression.
+    // See <https://github.com/rust-lang/rust/pull/74852> as last attempt try to remove it.
     #[inline]
     default fn to_string(&self) -> String {
         use fmt::Write;