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

In order to create accurate subspans into a `LitStr` there needs to be some way to map offsets from the string value into offsets of the `Literal`. As an example...

I tried to add `#[derive(Debug)]` to this struct ```rust #[derive(Debug)] struct Test { kw: T, eq_token: Token![=], // ... } ``` But the compiler offends me. ``` error: `derive` cannot...

Hello! I'm a little confused by `syn::Type`. I'm writing a derive macro and I really just need to know if a given field on the input struct is a `String`...

I'm trying to parse a set of declarations and then implementations, where the implementation parsing is dependent on information from the declaration portion. I'm having trouble getting that former information...

#1519 parenthesized!, braced! and bracketed! macros are very verbous in situations where you want to handle Err in current function beacause in this case they are expand in return statement....

Fixes #1588: `TokenMarker` is unexported.

I believe that `TokenMarker` has been accidentally been left unexported. It's `pub` while other non-exported items are `pub(crate)`. ```rust pub enum TokenMarker {} ``` https://github.com/dtolnay/syn/blob/master/src/lookahead.rs#L157 I ran into this when...

RFC: https://github.com/rust-lang/rfcs/pull/3348 Tracking issue: https://github.com/rust-lang/rust/issues/105723

syntax

I want to write a macro that adds a special type of statement. Currently I need to re-implement the sym functionality. It would make much easier if `AllowNoSemi` was exposed...