Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on syn & quote #28

Closed
jhpratt opened this issue Mar 27, 2021 · 2 comments · Fixed by #35
Closed

Remove dependency on syn & quote #28

jhpratt opened this issue Mar 27, 2021 · 2 comments · Fixed by #35
Labels
C-enhancement Category: A new feature or an improvement for an existing one

Comments

@jhpratt
Copy link

jhpratt commented Mar 27, 2021

Pretty much the same request as taiki-e/const_fn#16. The standback crate consists solely of extension traits (literally), but is meant to compile at very little cost. I'd like to use this crate as a dependency, but the weight of syn & quote (specifically syn as mentioned in the linked issue) is a deal-breaker.

If this could be removed, it would be great. If not, no big deal — I'll probably write some hacky proc macro (or maybe even macro_rules if I can manage).

@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Mar 27, 2021
bors bot added a commit that referenced this issue Mar 27, 2021
29: Remove dependency on syn/full and syn/visit-mut features r=taiki-e a=taiki-e

First step for #28.

Co-authored-by: Taiki Endo <[email protected]>
bors bot added a commit that referenced this issue Apr 26, 2021
30: Remove dependency on syn/derive feature and direct dependency on quote r=taiki-e a=taiki-e

- Remove dependency on syn/derive, syn/clone, syn/printing features

- Remove direct dependency on quote

- Fix "`?Trait` bounds are only permitted at the point where a type parameter is declared" error

    ```
    error: `?Trait` bounds are only permitted at the point where a type parameter is declared
      --> $DIR/maybe.rs:22:5
       |
    22 |     T: ?Sized,
       |     ^
    ```

cc #28

Co-authored-by: Taiki Endo <[email protected]>
@taiki-e
Copy link
Owner

taiki-e commented Apr 26, 2021

#30 implements what I considered to be the most difficult part of this issue, the handling (parsing) of generics and types.

(...And when I was writing tests for compatibility with some unstable syntax like specialization, I noticed that pub impl is syntactically accepted by rustc (#31).)

@taiki-e
Copy link
Owner

taiki-e commented Jun 23, 2021

Released in v0.2.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A new feature or an improvement for an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants