Skip to content

Commit 5b3174f

Browse files
authored
fix(macro): fix syntax error for #[php_class] with multiline doc comments
Refs: #467
1 parent 660f308 commit 5b3174f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

crates/macros/src/class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn generate_registered_class_impl(
153153
};
154154

155155
let docs = quote! {
156-
#(#docs)*
156+
#(#docs,)*
157157
};
158158

159159
let extends = if let Some(extends) = extends {

tests/src/integration/class/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![allow(clippy::unused_self)]
22
use ext_php_rs::{convert::IntoZval, prelude::*, types::Zval, zend::ce};
33

4+
/// Doc comment
5+
/// Goes here
46
#[php_class]
57
pub struct TestClass {
68
string: String,

0 commit comments

Comments
 (0)