summaryrefslogtreecommitdiff
path: root/src/codegen/helpers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen/helpers.rs')
-rw-r--r--src/codegen/helpers.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/codegen/helpers.rs b/src/codegen/helpers.rs
index 343f1e30..02909d57 100644
--- a/src/codegen/helpers.rs
+++ b/src/codegen/helpers.rs
@@ -36,6 +36,12 @@ pub mod attributes {
}
}
+ pub fn must_use() -> quote::Tokens {
+ quote! {
+ #[must_use]
+ }
+ }
+
pub fn doc(comment: String) -> quote::Tokens {
// Doc comments are already preprocessed into nice `///` formats by the
// time they get here. Just make sure that we have newlines around it so