Skip to content

[Feature]: std::panic::Location または track_caller を利用するfeature #156

@anotherhollow1125

Description

@anotherhollow1125

🎯 Motivation / 動機

std::panic::Location または #[track_caller] を利用することで次の記事で発生している問題を解決してみる

hooqマクロの記述回数をなるべく抑えたい【タイムカプセル】

🧩 Proposal / 提案内容

現在は proc_macro::Span::line 等から静的に得ているが、これだと先に添付した記事のようにSpanが誤った情報を指してしまう場合がある。

したがって、 std::panic::Location 等の仕組みを利用して動的に行数を得る手段も提供できるようにしたい

🧪 Example / 例(コード・UX)

🔀 Alternatives / 代替案

No response

⚠ Compatibility & Impact / 互換性・影響

featureで分ける予定

✅ Checklist / チェックリスト

  • I searched existing issues and discussions. / 既存Issue/Discussionを検索しました
  • This can be implemented behind a feature flag if needed. / 必要ならfeatureで切り替え可能です
  • I’m willing to contribute a PR. / PRで貢献できます

📝 Additional Context / 追加情報

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions