Skip to content

Commit

Permalink
Declarative modules: make sure to emmit doc comments and other attrib…
Browse files Browse the repository at this point in the history
…utes
  • Loading branch information
Tpt committed Jun 6, 2024
1 parent 37a5f6a commit 3ef2ac1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/4236.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Declarative modules: do not discard doc comments on the `mod` node.
1 change: 1 addition & 0 deletions pyo3-macros-backend/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ pub fn pymodule_module_impl(mut module: syn::ItemMod) -> Result<TokenStream> {

let initialization = module_initialization(options, ident);
Ok(quote!(
#(#attrs)*
#vis mod #ident {
#(#items)*

Expand Down

0 comments on commit 3ef2ac1

Please sign in to comment.