Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Update for latest libsyntax changes #44

Merged
merged 3 commits into from
May 3, 2016
Merged

Conversation

antrik
Copy link

@antrik antrik commented May 2, 2016

Syncs with current nightly (2016-04-28), and bumps version accordingly.

@antrik
Copy link
Author

antrik commented May 2, 2016

This turned out more involved than I had hoped for -- but it seems to be working now both with stable and nightly.

This supersedes the (non-functional) PRs #42 and #43 .

antrik added 2 commits May 2, 2016 08:18
Update to current Rust Nightly. (2016-04-28)

Note that this is not a straighforward merge commit, but rather contains
all adaptation necessary to make it work with stable Rust and syntex --
not just fixing the immediate merge conflicts.

In addition to the usual churn in syntex-syntax (`try!` etc.), this also
contains a minor change to syntex proper, to adapt it to an interface
change affecting it.
The recent interface changes are not backwards compatible -- so we need
a new semantic version...
@antrik
Copy link
Author

antrik commented May 2, 2016

OK, now it actually works ;-)

@@ -334,11 +334,11 @@ pub enum InlineAttr {
pub fn find_inline_attr(diagnostic: Option<&Handler>, attrs: &[Attribute]) -> InlineAttr {
attrs.iter().fold(InlineAttr::None, |ia,attr| {
match attr.node.value.node {
MetaItemKind::Word(ref n) if *n == "inline" => {
MetaItemKind::Word(ref n) if n == "inline" => {
Copy link

Choose a reason for hiding this comment

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

just out of curiosity, did this actually break or was it just possible to omit the explicit deref now? Because I changed something in rustc related to comparison of InternedString with &str

Copy link

Choose a reason for hiding this comment

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

oh... nevermind, I didn't get how syntex updates work xD this is actual code from rustc

@marcusklaas
Copy link

Great work! Did you have to remove all the unstable features by hand? 😨

@antrik
Copy link
Author

antrik commented May 2, 2016

@marcusklaas well, many bits already had been handled in previous updates, and thus were merged in automatically -- but there were many conflicts to resolve by hand; and some new places to handle too... So it was still fairly tedious. (Though some quick Vim macros helped a lot with the repetitive stuff :-) )

@nox
Copy link

nox commented May 3, 2016

@antrik I'm confused, why is there a merge in the middle of that PR? Could you rebase it?

@erickt
Copy link

erickt commented May 3, 2016

Thanks! This is awesome!

@nox: no, this is the right procedure for syntex. Check out https://github.com/serde-rs/syntex/blob/master/CONTRIBUTING.md. The reason for this is it's much simpler to sync with the upstream rust libsyntax if we store it in a side branch. This allows git to properly merge most changes, while preserving the patches we need to make syntex_syntax still work on stable rust.

@erickt erickt merged commit 060e561 into serde-deprecated:master May 3, 2016
This was referenced May 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants