Skip to content

Commit 7e1998c

Browse files
committed
Add a #[must_use] annotation to Span
1 parent b486867 commit 7e1998c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tracing/src/span.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ pub trait AsId: crate::sealed::Sealed {
328328
/// span will silently do nothing. Thus, the handle can be used in the same
329329
/// manner regardless of whether or not the trace is currently being collected.
330330
#[derive(Clone)]
331+
#[must_use = "once a span has been created, it should be entered"]
331332
pub struct Span {
332333
/// A handle used to enter the span when it is not executing.
333334
///

0 commit comments

Comments
 (0)