syn icon indicating copy to clipboard operation
syn copied to clipboard

Parser for Rust source code

Results 103 syn issues
Sort by recently updated
recently updated
newest added

So, if a proc-macro expects some input (in this case a trailing `;`) which is missing *at the end of input*, this can result in bad error messages: ``` error:...

Platform: Window10 1909 I followed [tauri doc](https://tauri.app/v1/guides/getting-started/setup/html-css-js) to run a demo but failed. Run `npm run tauri dev` to reproduce ```rust error[E0277]: the trait bound `proc_macro2::TokenStream: From` is not satisfied...

This is primarily intended for use with [`discouraged::Speculative`](https://docs.rs/syn/latest/syn/parse/discouraged/trait.Speculative.html) parsing in order to implement one of the suggested error strategies, namely to show the error from the speculative parse which consumed...

Here is my full journey to this absolutely strange bug. I have a pretty recent rustc (`rustc 1.64.0-nightly (f8588549c 2022-07-18)`). Right now I created empty proc macro lib. I typed...

The links to the reference do not fully compensate for the lack of examples yet they allow even less experienced rust developers understand which items are represented by [Generics](https://docs.rs/syn/latest/syn/struct.Generics.html) struct.

This is designed to make it easy to extend a `Punctuated` from an iterator over another `Punctuated`: 1. Auto-insert extra punctuation if extend-target does not have trailing comma. This is...

In something like: ```rust fn main() { thread_local! { static FOO: i32 = 1; } println! { "{}", FOO.with(i32::clone) } } ``` it's syntactically ambiguous whether the macros represent an...

Hello Syn team, I was trying to create a macro to be used with this sort of syntax: ```rs #[derive(MyThing)] #[mything(key = "MYKEY", newattr="SOMETHING")] struct XXX; ``` And access `key`...

There's a few things I often need while writing a derive macro, which I keep writing small helper functions for. I'm wondering if these should be part of `syn`, or...