Skip to content

Commit dc39fb4

Browse files
bors[bot]Jay Osterparasyte
committed
Merge #25
25: Fix features since nightly-2018-08-14 disallowed old features r=jethrogb a=parasyte Fixes #20 Co-authored-by: Jay Oster <[email protected]> Co-authored-by: Jay Oster <[email protected]>
2 parents 8e09f8c + f390668 commit dc39fb4

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

build.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ type Date = &'static str;
5252
/// versions for which to enable particular features.
5353
type ConditionalCfg = (Cfg, &'static [(Date, Cfg)]);
5454
const CONDITIONAL_CFGS: &'static [ConditionalCfg] = &[
55+
(None, &[("2019-02-24", Some("pattern_guards"))]),
56+
(None, &[("2018-08-14", Some("non_exhaustive"))]),
57+
(Some("unicode"), &[("2018-08-13", None)]),
5558
(None, &[("2018-01-01", Some("core_memchr"))]),
5659
(None, &[("2017-06-15", Some("no_collections"))]),
5760
(Some("rustc_unicode"), &[("2016-12-15", Some("std_unicode")), ("2017-03-03", None)]),
@@ -87,7 +90,7 @@ fn main() {
8790
let mut dest_path=PathBuf::from(env::var_os("OUT_DIR").unwrap());
8891
dest_path.push("io.rs");
8992
let mut f=File::create(&dest_path).unwrap();
90-
93+
9194
let mut target_path=PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
9295
target_path.push("src");
9396
target_path.push(io_commit);

ct.sh

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ RUST_VERSIONS=$(awk '{print $1}' <<EOF
1818
nightly-2018-03-07 # core_io release
1919
nightly-2018-08-06 # edge case: old features allowed
2020
nightly-2018-08-14 # edge case: old features disallowed
21+
nightly-2018-08-15 # edge case: non_exhaustive feature
22+
nightly-2019-02-25 # edge case: bind_by_move_pattern_guards feature
2123
nightly-2019-04-27 # core_io release
2224
EOF
2325
)

src/lib.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
//! the [std documentation](https://doc.rust-lang.org/nightly/std/io/index.html)
44
//! for a full description of the functionality.
55
#![allow(stable_features,unused_features)]
6-
#![feature(question_mark,const_fn,collections,alloc,unicode,copy_from_slice,
7-
str_char,try_from,str_internals,align_offset,doc_spotlight,
8-
slice_internals,non_exhaustive,bind_by_move_pattern_guards)]
6+
#![feature(question_mark,const_fn,copy_from_slice,try_from,str_internals,align_offset,
7+
doc_spotlight,slice_internals)]
8+
#![cfg_attr(any(feature="alloc",feature="collections"),feature(alloc))]
9+
#![cfg_attr(pattern_guards,feature(bind_by_move_pattern_guards,nll))]
10+
#![cfg_attr(not(no_collections),feature(collections))]
11+
#![cfg_attr(non_exhaustive,feature(non_exhaustive))]
12+
#![cfg_attr(unicode,feature(str_char))]
13+
#![cfg_attr(unicode,feature(unicode))]
914
#![no_std]
1015

1116
#[cfg_attr(feature="collections",macro_use)]

0 commit comments

Comments
 (0)