From 1c8ab7c872b67159033a2a7dd42168ee9af50771 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 15 Aug 2026 00:31:50 +0800 Subject: docs: add pathf_export macro to roadmap --- docs/dev/pages/issues/0.5.0-roadmap.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'docs/dev/pages/issues/0.5.0-roadmap.md') diff --git a/docs/dev/pages/issues/0.5.0-roadmap.md b/docs/dev/pages/issues/0.5.0-roadmap.md index 0312193..5238cae 100644 --- a/docs/dev/pages/issues/0.5.0-roadmap.md +++ b/docs/dev/pages/issues/0.5.0-roadmap.md @@ -108,6 +108,31 @@ version = "0.4.0" features = [ "build", "pathf" ] # No `dispatch_tree` feature; `pathf` no longer needs to consider its branches ``` +8. **Feature:** A new macro designed for `pathf`: `#[pathf_export(type::TypePath)]` + +`pathf` has been around since 0.2.0 and has worked well for a long time, with many edge cases resolved. However, it still lacks an escape hatch — "when certain indirect expansions cannot be recognized by `pathf`, how can we assist its inference?" + +I plan to introduce a new attribute macro to supplement `pathf`'s path inference. + +```rust +#[macro_export] +macro_rules! repack { + ($name:ident) => { + // Ignored! This section cannot be parsed by pathf. + #[mingling::macros::pathf_ignore] + #[derive(mingling::Grouped)] + pub struct $name; + }; +} + +// The expansion contains macros that need to be parsed by pathf +#[pathf_export(MyType)] // Explicitly specified to assist pathf's inference +repack!(MyType); +``` + +> [!Note] +> Haha, hopefully we'll never have to use it. +

Written by @Weicao-CatilGrass

-- cgit