From 9b96332958693b2b275f41dee6f6595af61c22f4 Mon Sep 17 00:00:00 2001 From: Justin Tracey Date: Thu, 2 Apr 2026 13:48:32 -0400 Subject: [PATCH] Annotate `Token` as `must_use` --- src/line_token.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/line_token.rs b/src/line_token.rs index b0f1928..3d75fe6 100644 --- a/src/line_token.rs +++ b/src/line_token.rs @@ -121,6 +121,7 @@ impl Line { } /// The outcome from trying to acquire a [`Token`] for a [`Line`]. +#[must_use = "if the token is unused the line will immediately release again"] pub enum AcquireOutcome<'ao> { /// The line could be acquired and returned a token to hold on to. /// @@ -165,6 +166,7 @@ impl<'ao> AcquireOutcome<'ao> { /// /// The [`Line`] is automatically released when this token goes out of scope and /// is dropped. +#[must_use = "if unused the line will immediately release again"] pub struct Token<'t> { line: &'t Line, }