Skip to content

syn API breaking change #189

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

Merged
merged 1 commit into from
Nov 11, 2017
Merged

syn API breaking change #189

merged 1 commit into from
Nov 11, 2017

Conversation

gnzlbg
Copy link
Contributor

@gnzlbg gnzlbg commented Nov 10, 2017

The syn API changed in the following commit breaking our builds: dtolnay/syn@c6b55bc

This commit fixes it by using the new API.

let attrs = match item {
syn::Item::Fn(ref item) => &item.attrs,
_ => panic!("item must be a function!"),
}.iter()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be done like this?

let attrs = func.attrs.iter()

I really don't know a lot about syn but it looks like the match with item is done previously and you can already access the attrs from func.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider also pinning to a particular git commit using rev. There are definitely other API changes coming as we converge on a real release.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 10, 2017 via email

@alexcrichton alexcrichton merged commit 4d7d2f1 into rust-lang:master Nov 11, 2017
@alexcrichton
Copy link
Member

👍

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 this pull request may close these issues.

4 participants