Skip to content

Commit a18eeac

Browse files
committed
Mark some PanicInfo methods as #[inline] for consistency.
1 parent 47f359b commit a18eeac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

std/src/panic.rs

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ impl<'a> PanicInfo<'a> {
7676
/// panic!("Normal panic");
7777
/// ```
7878
#[must_use]
79+
#[inline]
7980
#[stable(feature = "panic_hooks", since = "1.10.0")]
8081
pub fn payload(&self) -> &(dyn Any + Send) {
8182
self.payload
@@ -106,6 +107,7 @@ impl<'a> PanicInfo<'a> {
106107
/// panic!("Normal panic");
107108
/// ```
108109
#[must_use]
110+
#[inline]
109111
#[stable(feature = "panic_hooks", since = "1.10.0")]
110112
pub fn location(&self) -> Option<&Location<'_>> {
111113
// NOTE: If this is changed to sometimes return None,
@@ -124,6 +126,7 @@ impl<'a> PanicInfo<'a> {
124126
/// false, however this will simply cause the panic handler to be called
125127
/// again.
126128
#[must_use]
129+
#[inline]
127130
#[unstable(feature = "panic_can_unwind", issue = "92988")]
128131
pub fn can_unwind(&self) -> bool {
129132
self.can_unwind

0 commit comments

Comments
 (0)