diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs index a92bdd50cda..ed398b56612 100644 --- a/library/alloc/src/fmt.rs +++ b/library/alloc/src/fmt.rs @@ -606,13 +606,12 @@ use crate::string; #[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn format(args: Arguments<'_>) -> string::String { - #[cold] - fn format_cold(args: Arguments<'_>) -> string::String { + fn format_inner(args: Arguments<'_>) -> string::String { let capacity = args.estimated_capacity(); let mut output = string::String::with_capacity(capacity); output.write_fmt(args).expect("a formatting trait implementation returned an error"); output } - args.as_str().map_or_else(|| format_cold(args), crate::borrow::ToOwned::to_owned) + args.as_str().map_or_else(|| format_inner(args), crate::borrow::ToOwned::to_owned) }