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 b630a70b..1e8534ee 100644
--- a/src/codegen/helpers.rs
+++ b/src/codegen/helpers.rs
@@ -42,6 +42,12 @@ pub mod attributes {
}
}
+ pub fn non_exhaustive() -> TokenStream {
+ quote! {
+ #[non_exhaustive]
+ }
+ }
+
pub fn doc(comment: String) -> TokenStream {
// NOTE(emilio): By this point comments are already preprocessed and in
// `///` form. Quote turns them into `#[doc]` comments, but oh well.