You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah so that's the usecase, but why not just use parse2's error then?
This also breaks the proc macro structure I've argued for in the blog post, we still want parsing to be done inside.
Sorry that this basically means redoing the whole changeset.
Right I think I hated parse_macro_input! because it won't take procmacro2_TokenStream.
So first I would want to know what parse2 -> log/compile error says vs parse_macro_input
Right I think I hated parse_macro_input! because it won't take procmacro2_TokenStream. So first I would want to know what parse2 -> log/compile error says vs parse_macro_input
yeah that's why I kept it in lib.rs, so we don't get a mix of proc_macro::TokenStream and proc_macro2::TokenStream in the same file.
since this is always an error (and not bilge-specific) than presumably you'd want to not print anything, so the actual compile errors are the only thing the user sees
Sorry that this basically means redoing the whole changeset.
I dunno.
Keeping parsing inside would be nice. I just tried around a bit and this would be the most sane version of it: main...invalid-syntax
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
if macro input is invalid, we go straight to
unreachable, so something like thiswould panic with "entered unreachable code: should have already been validated".
syn::parse_macro_input!seems like a more sanitary way to do this.