diff options
| author | John Kugelman <john@kugelman.name> | 2021-10-30 22:58:27 -0400 |
|---|---|---|
| committer | John Kugelman <john@kugelman.name> | 2021-10-30 23:44:02 -0400 |
| commit | e129d49f88a69d4bb8cb0f45a0a674c17393f4e9 (patch) | |
| tree | b04e94e7af3aa049512a2dbdaa8ae8ca0c1583ff /library/std/src/backtrace.rs | |
| parent | e249ce6b2345587d6e11052779c86adbad626dff (diff) | |
| download | rust-e129d49f88a69d4bb8cb0f45a0a674c17393f4e9.tar.gz rust-e129d49f88a69d4bb8cb0f45a0a674c17393f4e9.zip | |
Add #[must_use] to remaining std functions (A-N)
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 { &[] } |
