David Tolnay

Results 358 issues of David Tolnay

As part of the library from #607 -- users will want to generate code that calls visitor / folder methods on specific syntax tree node types. Something like: ```rust impl...

Visiting a particular syntax tree node with [`syn::visit`](https://docs.rs/syn/0.14/syn/visit/index.html), the number of calls to `visit_span` should be equal to the number of tokens when converted into TokenStream. This test would help...

test

This can result in quadratic behavior as each interpolated value is flattened to tokens before being parsed again. ```rust for ... { let x = parse_quote! { ... #x ......

docs

This macro is commonly useful for building a syntax tree and should be featured more prominently. ```rust // Add a trait bound to every type parameter for param in &mut...

docs

Many of our modules have pretty nasty conditional imports. https://github.com/dtolnay/syn/blob/6f03cfcdd9438fb50a7618882d8ec77f3f12cc2b/src/lit.rs#L9-L24 I believe Serde handles this better by having [one shared module](https://github.com/serde-rs/serde/blob/v1.0.27/serde/src/lib.rs#L130-L133) that contains all possible imports and is imported [all...

code quality

Add a test asserting that the upstream [`parse-fail`](https://github.com/rust-lang/rust/tree/master/src/test/parse-fail) test cases each fail to parse. Okay if we need to blacklist some of them to begin with.

test

Rust macro_rules macros can be expanded in pattern position: ```rust macro_rules! zero { () => { 0 } } fn main() { if let zero!() = 0 {} } ```...

limitation

Currently rfcbot.rs exposes a convenient list of proposed-FCP issues that I have not signed off yet (https://rfcbot.rs/fcp/dtolnay). But once n-2 team members have signed off and the issue enters FCP,...

enhancement

Every crate on crates.io is for Rust :smile: no reason for the -rs suffix.

would be nice to have
infrastructure

I don't know for sure that this is possible, but it seems likely because C++ compiled to wasm would need to support static initializers somehow. I would love to use...

enhancement
blocked