Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serde_derive breaks module path #177

Closed
figsoda opened this issue Mar 23, 2023 · 1 comment · Fixed by dtolnay/syn#1422
Closed

serde_derive breaks module path #177

figsoda opened this issue Mar 23, 2023 · 1 comment · Fixed by dtolnay/syn#1422

Comments

@figsoda
Copy link

figsoda commented Mar 23, 2023

serde_derive emits macro_rules! try, which doesn't parse with syn v2

minimum reproducible example

// src/lib.rs
#[derive(serde::Deserialize)]
struct A;

pub fn a() {}
cargo expand a

expected: pub fn a() {}

actual: everything gets printed because syn::parse_file fails here

if let Ok(mut syntax_tree) = syn::parse_file(&wip) {

@dtolnay
Copy link
Owner

dtolnay commented Mar 23, 2023

Fixed in cargo-expand 1.0.42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants