dropbox / dropbox/rust-alloc-no-stdlib

Macros are not self-contained

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
180
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Exported Rust macros (per best "hygiene" practices) should not require any external paths to be brought into local scope. So, if a crate exports a macro, that macro should only use fully-qualified items from the same crate, or more specifically - use the `$crate` metavariable per [docs](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html#crate).

At least `declare_stack_allocator_struct!` macro uses non-fully-qualified identifiers like `declare_stack_allocator_struct!` inside, requiring crate users to `use` it, making the code unclean and possibly error prone.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the exported declare_stack_allocator_struct! macro and inspect its internal references and any existing macro tests or examples. Verify that its references use fully qualified same-crate paths or $crate, and confirm a downstream invocation works without importing those identifiers into local scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.