-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
local_inner_macros
to all helper macros (#233)
This enables Rust2018-style macro imports: ```rust use juniper::graphql_object; graphql_object!(User: () |&self| { ... }); ``` In the future when dropping compatibility with pre-2018 compilers, this can be replaced with the explicit `$crate` prefixes instead of `local_inner_macros`. In `macro_rules!` with the annotation `local_inner_macros`, all of macro calls are transformed into `$crate::builtin!(...)` (See [1] for details). Therefore, name resolutions of built-in macros are not perfomed correctly. To avoid this, some helper macros are introduced to make built-in macros be interpreted as crate-local macros. [1]: rust-lang/rust#53464 (comment)
- Loading branch information
1 parent
273edc1
commit d496220
Showing
7 changed files
with
55 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters