Fix features since nightly-2018-08-14 disallowed old features
This commit is contained in:
parent
8e09f8c5da
commit
84b617b1ea
5
build.rs
5
build.rs
|
@ -52,6 +52,11 @@ type Date = &'static str;
|
||||||
/// versions for which to enable particular features.
|
/// versions for which to enable particular features.
|
||||||
type ConditionalCfg = (Cfg, &'static [(Date, Cfg)]);
|
type ConditionalCfg = (Cfg, &'static [(Date, Cfg)]);
|
||||||
const CONDITIONAL_CFGS: &'static [ConditionalCfg] = &[
|
const CONDITIONAL_CFGS: &'static [ConditionalCfg] = &[
|
||||||
|
(None, &[("2019-02-24", Some("pattern_guards"))]),
|
||||||
|
(None, &[("2018-08-14", Some("non_exhaustive"))]),
|
||||||
|
(Some("collections"), &[("2018-08-13", None)]),
|
||||||
|
(Some("str_char"), &[("2018-08-13", None)]),
|
||||||
|
(Some("unicode"), &[("2018-08-13", None)]),
|
||||||
(None, &[("2018-01-01", Some("core_memchr"))]),
|
(None, &[("2018-01-01", Some("core_memchr"))]),
|
||||||
(None, &[("2017-06-15", Some("no_collections"))]),
|
(None, &[("2017-06-15", Some("no_collections"))]),
|
||||||
(Some("rustc_unicode"), &[("2016-12-15", Some("std_unicode")), ("2017-03-03", None)]),
|
(Some("rustc_unicode"), &[("2016-12-15", Some("std_unicode")), ("2017-03-03", None)]),
|
||||||
|
|
2
ct.sh
2
ct.sh
|
@ -18,6 +18,8 @@ RUST_VERSIONS=$(awk '{print $1}' <<EOF
|
||||||
nightly-2018-03-07 # core_io release
|
nightly-2018-03-07 # core_io release
|
||||||
nightly-2018-08-06 # edge case: old features allowed
|
nightly-2018-08-06 # edge case: old features allowed
|
||||||
nightly-2018-08-14 # edge case: old features disallowed
|
nightly-2018-08-14 # edge case: old features disallowed
|
||||||
|
nightly-2018-08-15 # edge case: non_exhaustive feature
|
||||||
|
nightly-2019-02-25 # edge case: bind_by_move_pattern_guards feature
|
||||||
nightly-2019-04-27 # core_io release
|
nightly-2019-04-27 # core_io release
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
11
src/lib.rs
11
src/lib.rs
|
@ -3,9 +3,14 @@
|
||||||
//! the [std documentation](https://doc.rust-lang.org/nightly/std/io/index.html)
|
//! the [std documentation](https://doc.rust-lang.org/nightly/std/io/index.html)
|
||||||
//! for a full description of the functionality.
|
//! for a full description of the functionality.
|
||||||
#![allow(stable_features,unused_features)]
|
#![allow(stable_features,unused_features)]
|
||||||
#![feature(question_mark,const_fn,collections,alloc,unicode,copy_from_slice,
|
#![feature(question_mark,const_fn,copy_from_slice,try_from,str_internals,align_offset,
|
||||||
str_char,try_from,str_internals,align_offset,doc_spotlight,
|
doc_spotlight,slice_internals)]
|
||||||
slice_internals,non_exhaustive,bind_by_move_pattern_guards)]
|
#![cfg_attr(any(feature="alloc",feature="collections"),feature(alloc))]
|
||||||
|
#![cfg_attr(pattern_guards,feature(bind_by_move_pattern_guards,nll))]
|
||||||
|
#![cfg_attr(collections,feature(collections))]
|
||||||
|
#![cfg_attr(non_exhaustive,feature(non_exhaustive))]
|
||||||
|
#![cfg_attr(str_char,feature(str_char))]
|
||||||
|
#![cfg_attr(unicode,feature(unicode))]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
#[cfg_attr(feature="collections",macro_use)]
|
#[cfg_attr(feature="collections",macro_use)]
|
||||||
|
|
Loading…
Reference in New Issue