Skip to content

Accept paths in wrap_* macros #1709

@Legend-of-iPhoenix

Description

@Legend-of-iPhoenix

For example, for a python submodule defined in a separate rust module, the following fails to compile with an error saying that no rules expected the ::.

use pyo3::prelude::*;
use pyo3::{wrap_pymodule};

mod a;

#[pymodule]
fn mymodule(_py: Python, module: &PyModule) -> PyResult<()> {
	module.add_wrapped(wrap_pymodule!(a::submodule))?;

	Ok(())
}

There was a tiny bit of discussion about this over on the matrix channel.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions