dtolnay / syn

Parser for Rust source code
Apache License 2.0
2.88k stars 311 forks source link

implement `Copy` for `Nothing` #1596

Closed programmerjake closed 7 months ago

programmerjake commented 7 months ago

I have a generic struct MyAttr<Body> that I use to hold a parsed #[my_attr(<body>)], I want to use MyAttr<Nothing>: Clone where I want to hold a parsed #[my_attr], but Nothing doesn't implement Clone.

I see no reason why it can't just implement Copy.

programmerjake commented 7 months ago

related, it would also be nice to implement ToTokens

programmerjake commented 7 months ago

Thanks!