about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-24 01:05:54 +0100
committerGitHub <noreply@github.com>2024-03-24 01:05:54 +0100
commit6f16b41a4b299bfa31355e2d05110f54df93f9d8 (patch)
tree80d72f7a0b6837eb1e4bcd70226b3111aada163f
parent2463ad0f5fb31ef1755fbf39a54a0b998e6b61f2 (diff)
parente74b01e9256579b285962b148a6f640bc44c0b5d (diff)
downloadrust-6f16b41a4b299bfa31355e2d05110f54df93f9d8.tar.gz
rust-6f16b41a4b299bfa31355e2d05110f54df93f9d8.zip
Rollup merge of #122963 - RalfJung:core-panicking, r=m-ou-se
core/panicking: fix outdated comment

Looks like this function got renamed/changed at some point and the comment did not get updated.

r? `@m-ou-se`
-rw-r--r--library/core/src/panicking.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/panicking.rs b/library/core/src/panicking.rs
index 9e8dac88816..a8940d9cd1e 100644
--- a/library/core/src/panicking.rs
+++ b/library/core/src/panicking.rs
@@ -132,11 +132,11 @@ pub const fn panic_nounwind_fmt(fmt: fmt::Arguments<'_>, force_no_backtrace: boo
 #[rustc_const_unstable(feature = "panic_internals", issue = "none")]
 #[lang = "panic"] // needed by codegen for panic on overflow and other `Assert` MIR terminators
 pub const fn panic(expr: &'static str) -> ! {
-    // Use Arguments::new_v1 instead of format_args!("{expr}") to potentially
+    // Use Arguments::new_const instead of format_args!("{expr}") to potentially
     // reduce size overhead. The format_args! macro uses str's Display trait to
     // write expr, which calls Formatter::pad, which must accommodate string
     // truncation and padding (even though none is used here). Using
-    // Arguments::new_v1 may allow the compiler to omit Formatter::pad from the
+    // Arguments::new_const may allow the compiler to omit Formatter::pad from the
     // output binary, saving up to a few kilobytes.
     panic_fmt(fmt::Arguments::new_const(&[expr]));
 }