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

Feature gate box syntax #20723

Merged
merged 15 commits into from
Jan 8, 2015
Merged

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Jan 7, 2015

Added box_syntax feature gate; added to std and rustc crates for bootstrap.

To avoid using the feature, change uses of box <expr> to Box::new(<expr>) alternative, as noted by the feature gate message.

(Note that box patterns have no analogous trivial replacement, at least not in general; you need to revise the code to do a partial match, deref, and then the rest of the match.)

[breaking-change]

@rust-highfive
Copy link
Collaborator

r? @huonw

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

@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 7, 2015

(i'm still doing a local make check run now; hopefully this one will work. i had some problems with an earlier strategy I was employing and am hoping this "dead simple" approach will just work.)

@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 7, 2015

argh still need to pepper more crates with #![allow(unknown_feature)]

…otstrap.

To avoid using the feauture, change uses of `box <expr>` to
`Box::new(<expr>)` alternative, as noted by the feature gate message.

(Note that box patterns have no analogous trivial replacement, at
least not in general; you need to revise the code to do a partial
match, deref, and then the rest of the match.)

[breaking-change]
Specifically added to the test, librustc_trans, librustc_typeck crates.
feature gate net.

fix typo in my feature-gate-box-expr.rs test.
@aturon
Copy link
Member

aturon commented Jan 7, 2015

@pnkfelix Talking more with the rest of the core team, we actually feel like #[stable] for Box::new is fine -- note that Rc::new and friends are already #[stable], and having a standard constructor seems like a very minimal commitment regardless of how box syntax works out.

@pnkfelix pnkfelix force-pushed the feature-gate-box-syntax branch from 0d4baae to 3010e10 Compare January 7, 2015 23:45
@aturon
Copy link
Member

aturon commented Jan 7, 2015

(Thanks for getting this out so quickly btw!)

@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 8, 2015

(still waiting on a local make check; but i'll be tagging this with r=huonw once that is done)

@pnkfelix
Copy link
Member Author

pnkfelix commented Jan 8, 2015

(handing off to acrichto to deal with remaining fallout as part of rollup)

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 8, 2015
Conflicts:
	src/compiletest/compiletest.rs
	src/libcollections/lib.rs
	src/libserialize/lib.rs
	src/libsyntax/feature_gate.rs
@bors bors merged commit ae4bcd4 into rust-lang:master Jan 8, 2015
alkor added a commit to alkor/rust-http that referenced this pull request Jan 11, 2015
pnkfelix added a commit to pnkfelix/rust that referenced this pull request Feb 13, 2015
Rollup merge (373cbab) of PR rust-lang#20723
accidentally reverted a portion of commit
8327bcc which shifted
`slicing_syntax` from Active to Accepted.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Feb 13, 2015
…cepted, r=nikomatsakis

Rollup merge (373cbab) of PR rust-lang#20723
accidentally reverted a portion of commit
8327bcc which shifted
`slicing_syntax` from Active to Accepted.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Feb 14, 2015
…cepted, r=nikomatsakis

Rollup merge (373cbab) of PR rust-lang#20723
accidentally reverted a portion of commit
8327bcc which shifted
`slicing_syntax` from Active to Accepted.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Feb 15, 2015
…cepted, r=nikomatsakis

Re-tag `slicing_syntax` as `Accepted`.

Rollup merge (373cbab) of PR rust-lang#20723
accidentally reverted a portion of commit
8327bcc which shifted
`slicing_syntax` from Active to Accepted.
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 15, 2015
…cepted, r=nikomatsakis

 Re-tag `slicing_syntax` as `Accepted`.

Rollup merge (373cbab) of PR rust-lang#20723
accidentally reverted a portion of commit
8327bcc which shifted
`slicing_syntax` from Active to Accepted.
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 24, 2015
As part of the audit for rust-lang#22820 the following duplicate feature
gate tests were removed:

* `box_patterns`
* `simd_ffi`

These tests for `box_patterns` and `simd_ffi` were added in rust-lang#23578,
however there were existing tests in rust-lang#20723 and rust-lang#21233 respectively.

r? @nrc
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 24, 2015
As part of the audit for rust-lang#22820 the following duplicate feature
gate tests were removed:

* `box_patterns`
* `simd_ffi`

These tests for `box_patterns` and `simd_ffi` were added in rust-lang#23578,
however there were existing tests in rust-lang#20723 and rust-lang#21233 respectively.

r? @nrc
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 25, 2015
As part of the audit for rust-lang#22820 the following duplicate feature
gate tests were removed:

* `box_patterns`
* `simd_ffi`

These tests for `box_patterns` and `simd_ffi` were added in rust-lang#23578,
however there were existing tests in rust-lang#20723 and rust-lang#21233 respectively.

r? @nrc
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.

6 participants