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

Remove some feature flag usage from libsyntax #24487

Merged
merged 13 commits into from
Apr 22, 2015
Merged

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Apr 16, 2015

This removes the usage of #[feature(into_cow, slice_patterns, box_syntax, box_patterns, quote, unsafe_destructor)] from being used in libsyntax. My main desire for this is that it brings me one step closer to letting syntex compile with stable rust. Hopefully this doesn't inconvenience rust development.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@Manishearth
Copy link
Member

@bors-servo: r+

@bors
Copy link
Contributor

bors commented Apr 16, 2015

📌 Commit c499fee has been approved by Manishearth

@erickt
Copy link
Contributor Author

erickt commented Apr 17, 2015

Fixed the tidy issue and eliminated a few other feature flags.

pub struct Printer<'a> {
pub out: Box<io::Write+'a>,
pub struct Printer<W> {
pub out: W,
Copy link
Member

Choose a reason for hiding this comment

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

In the past we've had some pretty bad code bloat problems by having a totally generic pretty printer, so I'm curious what instigated this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to make it easy to get to the underlying Vec so I could get rid of the reference to TraitObject and the transmute, but I can try a different approach.

@erickt
Copy link
Contributor Author

erickt commented Apr 17, 2015

@alexcrichton: turned out I could have saved myself a bunch of time trying to get rid of TraitObject by just using a scope and a &mut :)

... I think serde might have gotten me addicted to type parameters...

@alexcrichton
Copy link
Member

@bors: r+ 3721bdf

Thanks!

@bors
Copy link
Contributor

bors commented Apr 18, 2015

☔ The latest upstream changes (presumably #23985) made this pull request unmergeable. Please resolve the merge conflicts.

@erickt
Copy link
Contributor Author

erickt commented Apr 19, 2015

@bors: r=alexcrichton 51a2935

@bors
Copy link
Contributor

bors commented Apr 19, 2015

⌛ Testing commit 51a2935 with merge 7805349...

@bors
Copy link
Contributor

bors commented Apr 20, 2015

💔 Test failed - auto-linux-64-nopt-t

@Manishearth
Copy link
Member

/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:838:13: 841:53 error: slice pattern syntax is experimental
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:838             [ast::TtToken(_, token::Ident(name_macro_rules, token::Plain)),
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:839              ast::TtToken(_, token::Not),
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:840              ast::TtToken(_, token::Ident(name_zip, token::Plain)),
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:841              ast::TtDelimited(_, ref macro_delimed)]
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:838:13: 841:53 help: add #![feature(slice_patterns)] to the crate attributes to enable
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:845:21: 847:62 error: slice pattern syntax is experimental
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:845                     [ast::TtDelimited(_, ref first_delimed),
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:846                      ast::TtToken(_, token::FatArrow),
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:847                      ast::TtDelimited(_, ref second_delimed)]
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:845:21: 847:62 help: add #![feature(slice_patterns)] to the crate attributes to enable
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:850:29: 851:80 error: slice pattern syntax is experimental
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:850                             [ast::TtToken(_, token::Dollar),
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:851                              ast::TtToken(_, token::Ident(name, token::Plain))]
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:850:29: 851:80 help: add #![feature(slice_patterns)] to the crate attributes to enable
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:857:29: 858:80 error: slice pattern syntax is experimental
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:857                             [ast::TtToken(_, token::Dollar),
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:858                              ast::TtToken(_, token::Ident(name, token::Plain))]
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/parse/mod.rs:857:29: 858:80 help: add #![feature(slice_patterns)] to the crate attributes to enable
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ext/expand.rs:1966:13: 1966:16 error: slice pattern syntax is experimental
/home/ubuntu/src/rust-buildbot/slave/auto-linux-64-nopt-t/build/src/libsyntax/ext/expand.rs:1966             [b] => b,

@erickt
Copy link
Contributor Author

erickt commented Apr 21, 2015

@alexcrichton: I included a few more commits that haven't been reviewed. I don't think you've seen the last 4 yet.

@alexcrichton
Copy link
Member

Looks good to me! Could this hold off on the last commit for now though? Duplicating that kind of code is a bit unfortunate and there's still other features in use by libsyntax so we can hold off on the duplication as long as possible (hopefully!)

@erickt
Copy link
Contributor Author

erickt commented Apr 21, 2015

@alexcrichton: Sure no problem. I'll remove that patch for now.

@alexcrichton
Copy link
Member

@bors: r+ 19c8d70

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 21, 2015
This removes the usage of `#[feature(into_cow, slice_patterns, box_syntax, box_patterns, quote, unsafe_destructor)]` from being used in libsyntax. My main desire for this is that it brings me one step closer to letting [syntex](https://github.com/erickt/rust-syntex) compile with stable rust. Hopefully this doesn't inconvenience rust development.
@bors bors merged commit 19c8d70 into rust-lang:master Apr 22, 2015
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.

5 participants