From 59aa99ced96d63160b21a568b23a66cc6d0e302e Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Fri, 14 Nov 2025 20:25:42 +0000 Subject: [PATCH] fix docstring --- tools/src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/src/main.rs b/tools/src/main.rs index deff263..2f05552 100644 --- a/tools/src/main.rs +++ b/tools/src/main.rs @@ -343,9 +343,13 @@ fn extract_docstring(attrs: &[Attribute]) -> Option { // #[doc = "…"] if let Ok(meta) = attr.parse_meta() { if let syn::Meta::NameValue(nv) = meta { - // The field is `value`, not `lit` - if let syn::Lit::Str(lit) = nv.value { - docs.push(lit.value()); + // The value is an `Expr`. Pull out a string literal. + if let syn::Expr::Lit(syn::ExprLit { + lit: syn::Lit::Str(lit_str), + .. + }) = nv.value + { + docs.push(lit_str.value()); } } }