Skip to content

Make the merc_derive_terms macro hygienic such that it does not require additional use imports #52

@mlaveaux

Description

@mlaveaux

The merc_derive_terms procedural macro, defined in the merc_macros crate, uses various types from the merc_aterm crate in its generated code, but these must be explicitly included even though they are not used directly:

use merc_aterm::ATermRef;
use merc_aterm::Symbol;
use merc_aterm::SymbolRef;
use merc_aterm::Markable;
use merc_aterm::Transmutable;

However, the issue seems to be that the macro is used in merc_aterm as well. So we cannot replace these by ::merc_aterm::ATermRef as suggested for normal hygienic proc macros. Using $crate only works for the current crate, which would be merc_macros itself.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions