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

Fix features since nightly-2018-08-14 disallowed old features #25

Merged
merged 2 commits into from
Jun 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ type Date = &'static str;
/// versions for which to enable particular features.
type ConditionalCfg = (Cfg, &'static [(Date, Cfg)]);
const CONDITIONAL_CFGS: &'static [ConditionalCfg] = &[
(None, &[("2019-02-24", Some("pattern_guards"))]),
(None, &[("2018-08-14", Some("non_exhaustive"))]),
(Some("unicode"), &[("2018-08-13", None)]),
parasyte marked this conversation as resolved.
Show resolved Hide resolved
(None, &[("2018-01-01", Some("core_memchr"))]),
(None, &[("2017-06-15", Some("no_collections"))]),
(Some("rustc_unicode"), &[("2016-12-15", Some("std_unicode")), ("2017-03-03", None)]),
Expand Down Expand Up @@ -87,7 +90,7 @@ fn main() {
let mut dest_path=PathBuf::from(env::var_os("OUT_DIR").unwrap());
dest_path.push("io.rs");
let mut f=File::create(&dest_path).unwrap();

let mut target_path=PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
target_path.push("src");
target_path.push(io_commit);
Expand Down
2 changes: 2 additions & 0 deletions ct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ RUST_VERSIONS=$(awk '{print $1}' <<EOF
nightly-2018-03-07 # core_io release
nightly-2018-08-06 # edge case: old features allowed
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
EOF
)
Expand Down
11 changes: 8 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
//! the [std documentation](https://doc.rust-lang.org/nightly/std/io/index.html)
//! for a full description of the functionality.
#![allow(stable_features,unused_features)]
#![feature(question_mark,const_fn,collections,alloc,unicode,copy_from_slice,
str_char,try_from,str_internals,align_offset,doc_spotlight,
slice_internals,non_exhaustive,bind_by_move_pattern_guards)]
#![feature(question_mark,const_fn,copy_from_slice,try_from,str_internals,align_offset,
doc_spotlight,slice_internals)]
#![cfg_attr(any(feature="alloc",feature="collections"),feature(alloc))]
#![cfg_attr(pattern_guards,feature(bind_by_move_pattern_guards,nll))]
#![cfg_attr(not(no_collections),feature(collections))]
#![cfg_attr(non_exhaustive,feature(non_exhaustive))]
#![cfg_attr(unicode,feature(str_char))]
#![cfg_attr(unicode,feature(unicode))]
#![no_std]

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