-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow generics in fn
definition
#18
Comments
@DanielKeep: The problem actually isn't using the information for generics -- I just need to forward that text along into the new Any suggestions? I have looked at the source you linked, and it seems that you depend on procedural macros. I could be wrong, since I'm very new to writing macros, though. |
There's an implementation of those macros as a compiler plugin, but that link is to the As for how you're trying to do it, there is no way to match generic arguments directly. The grammar is simply too complex for The way you use them is to capture everything up to where the generic parameter list starts. You capture everything left as The |
@DanielKeep: Excellent! I'm starting to understand your examples better now. Macros by example are a new ball game to me, and I'm definitely learning a lot. So, I'm trying to make the
...but I'm definitely missing something, since I can't try using it and compile yet. What steps do I need for setup? I'm sure that I'm simply not used to setting up macro-heavy dependencies like this. EDIT: As a note, I think I understand the mechanism for using the |
@DanielKeep: Ah, I was making a rookie mistake -- there's still no good way to re-export macros, so I need to have the Alright, excited to try this! Not excited to force users to |
Well the plugin version likely doesn't work any more, so I'd just remove it. The MBE macros should work fine in nightly.
I'd recommend just copy+pasting the macros into your own crate under different names. Until re-exporting is added, it's about the only way to not drive your users mad. |
@DanielKeep: Excellent news! I've managed to successfully implement generics support in a feature branch here. My only concern with how I've got it working right now, however, is that right now the doctests are failing in the That doesn't feel good, though, because I'm sure you had valid doctests at some point. Does the markdown simply need to be corrected a la the solution to the markdown parsing bug in Rustdoc here? I'm not sure, since I didn't write that code, and the docs are pretty intense. Kudos for the extensive documentation, by the way! |
At a casual glance, it looks like the problem is that the doc tests are still trying to use the original crates. If you've moved the macros into your own crate, you need to adjust the tests since the crate names will have changed. |
Strange, for some reason it seems that
I've saved off the WIP at the |
@DanielKeep: I've created an issue specifically regarding my concerns with doctests for Again, thanks so much for the help! You're awesome. :) |
No description provided.
The text was updated successfully, but these errors were encountered: