diff options
Diffstat (limited to 'library/std/src/backtrace.rs')
| -rw-r--r-- | library/std/src/backtrace.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/backtrace.rs b/library/std/src/backtrace.rs index 9ace3e1b600..0b86b4f30b9 100644 --- a/library/std/src/backtrace.rs +++ b/library/std/src/backtrace.rs @@ -110,6 +110,7 @@ use crate::vec::Vec; /// previous point in time. In some instances the `Backtrace` type may /// internally be empty due to configuration. For more information see /// `Backtrace::capture`. +#[must_use] pub struct Backtrace { inner: Inner, } @@ -355,6 +356,7 @@ impl Backtrace { /// Returns the status of this backtrace, indicating whether this backtrace /// request was unsupported, disabled, or a stack trace was actually /// captured. + #[must_use] pub fn status(&self) -> BacktraceStatus { match self.inner { Inner::Unsupported => BacktraceStatus::Unsupported, @@ -366,6 +368,7 @@ impl Backtrace { impl<'a> Backtrace { /// Returns an iterator over the backtrace frames. + #[must_use] #[unstable(feature = "backtrace_frames", issue = "79676")] pub fn frames(&'a self) -> &'a [BacktraceFrame] { if let Inner::Captured(c) = &self.inner { &c.force().frames } else { &[] } |
