dropbox / dropbox/rust-alloc-no-stdlib

Macros are not self-contained

Aperta
#19 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
180
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.