David Tolnay

Results 700 comments of David Tolnay

I don't completely follow what you are doing but it sounds like the thing you want is: ```rust f.attrs.push(parse_quote!(#[new_attr])); ``` Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c686a1aecdc0800b597d4ed2483e305a > Once I click through to `ParseStream` and...

Labeling to make sure this gets covered in the Attribute docs.

We have some experience with the approach you are thinking of from experimenting with it in Serde 0.7. We ended up quickly going back to the approach shown in the...

Seems reasonable. Please send a PR.

I guess I have the opposite perspective. Typically in custom derives you just need the field types to be shuffled from the input to the right places in the output....

Triage: I don't think we need to care about this until const generics are implemented in nightly.

I see missing visit_span calls in: - fields of type TokenStream; - some variants of Lit; - punctuation of a Punctuated (#291).

I don't know of a way to fix this unfortunately, but I would accept a PR if anyone comes up with something.

Thanks, this is useful feedback. Regarding Block::parse_within, yes the [documentation for that method](https://docs.rs/syn/0.15.3/syn/struct.Block.html#method.parse_within) says that it parses "the body of a block as zero or more statements, possibly including one...