Skip to content

Commit 4a31aad

Browse files
committed
Added box_syntax feature gate; added to std and rustc crates for bootstrap.
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]
1 parent 82af2a1 commit 4a31aad

File tree

14 files changed

+25
-0
lines changed

14 files changed

+25
-0
lines changed

src/liballoc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
#![no_std]
6767
#![allow(unknown_features)]
6868
#![feature(lang_items, unsafe_destructor)]
69+
#![feature(box_syntax)]
6970

7071
#[macro_use]
7172
extern crate core;

src/libcollections/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#![allow(unknown_features)]
2525
#![feature(unsafe_destructor, slicing_syntax)]
2626
#![feature(old_impl_check)]
27+
#![feature(box_syntax)]
2728
#![feature(unboxed_closures)]
2829
#![no_std]
2930

src/liblog/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
html_root_url = "http://doc.rust-lang.org/nightly/",
165165
html_playground_url = "http://play.rust-lang.org/")]
166166
#![feature(slicing_syntax)]
167+
#![feature(box_syntax)]
167168
#![deny(missing_docs)]
168169

169170
extern crate regex;

src/libregex/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#![allow(unknown_features)]
2626
#![feature(slicing_syntax)]
27+
#![feature(box_syntax)]
2728
#![deny(missing_docs)]
2829

2930
#[cfg(test)]

src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#![allow(unknown_features)]
2626
#![feature(quote)]
2727
#![feature(slicing_syntax, unsafe_destructor)]
28+
#![feature(box_syntax)]
2829
#![feature(rustc_diagnostic_macros)]
2930
#![feature(old_impl_check)]
3031

src/librustc_trans/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#![feature(quote)]
2626
#![feature(slicing_syntax, unsafe_destructor)]
27+
#![feature(box_syntax)]
2728
#![feature(rustc_diagnostic_macros)]
2829

2930
extern crate arena;

src/librustc_typeck/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ This API is completely unstable and subject to change.
7373

7474
#![feature(quote)]
7575
#![feature(slicing_syntax, unsafe_destructor)]
76+
#![feature(box_syntax)]
7677
#![feature(rustc_diagnostic_macros)]
7778
#![allow(non_camel_case_types)]
7879

src/librustdoc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
html_root_url = "http://doc.rust-lang.org/nightly/",
1818
html_playground_url = "http://play.rust-lang.org/")]
1919
#![feature(slicing_syntax)]
20+
#![feature(box_syntax)]
2021

2122
extern crate arena;
2223
extern crate getopts;

src/libserialize/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Core encoding and decoding interfaces.
2424
html_playground_url = "http://play.rust-lang.org/")]
2525
#![allow(unknown_features)]
2626
#![feature(slicing_syntax)]
27+
#![feature(box_syntax)]
2728
#![feature(old_impl_check)]
2829
#![cfg_attr(stage0, allow(unused_attributes))]
2930

src/libstd/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
#![feature(linkage, thread_local, asm)]
108108
#![feature(lang_items, unsafe_destructor)]
109109
#![feature(slicing_syntax, unboxed_closures)]
110+
#![feature(box_syntax)]
110111
#![feature(old_impl_check)]
111112
#![cfg_attr(stage0, allow(unused_attributes))]
112113

0 commit comments

Comments
 (0)