error: `submodule` may only be specified once (it is implicitly always specified for nested modules) --> tests/ui/duplicate_pymodule_submodule.rs:4:2 | 4 | mod submod {} | ^^^ error[E0425]: cannot find value `_PYO3_DEF` in module `submod` --> tests/ui/duplicate_pymodule_submodule.rs:1:1 | 1 | #[pyo3::pymodule] | ^^^^^^^^^^^^^^^^^ not found in `submod` | = note: this error originates in the attribute macro `pyo3::pymodule` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider importing this static | 3 + use crate::mymodule::_PYO3_DEF; |