diff --git a/recipes-devtools/rust/files/rust-1.21.0/0001-librustc-always-allow-unstable-options.patch b/recipes-devtools/rust/files/rust-1.21.0/0001-librustc-always-allow-unstable-options.patch new file mode 100644 index 0000000..b311863 --- /dev/null +++ b/recipes-devtools/rust/files/rust-1.21.0/0001-librustc-always-allow-unstable-options.patch @@ -0,0 +1,43 @@ +From 6a82f31d21ac7b85211e580585cc73ab2bdb0bc9 Mon Sep 17 00:00:00 2001 +From: Tyler Hall +Date: Sun, 29 Oct 2017 16:29:03 -0400 +Subject: [PATCH] librustc: always allow unstable options + +--- + src/librustc/session/config.rs | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs +index 4b41572c1a..97381bc05c 100644 +--- a/src/librustc/session/config.rs ++++ b/src/librustc/session/config.rs +@@ -1703,8 +1703,6 @@ pub mod nightly_options { + + pub fn check_nightly_options(matches: &getopts::Matches, flags: &[RustcOptGroup]) { + let has_z_unstable_option = matches.opt_strs("Z").iter().any(|x| *x == "unstable-options"); +- let really_allows_unstable_options = UnstableFeatures::from_environment() +- .is_nightly_build(); + + for opt in flags.iter() { + if opt.stability == OptionStability::Stable { +@@ -1719,17 +1717,6 @@ pub mod nightly_options { + the flag `{}`", + opt.name)); + } +- if really_allows_unstable_options { +- continue +- } +- match opt.stability { +- OptionStability::Unstable => { +- let msg = format!("the option `{}` is only accepted on the \ +- nightly compiler", opt.name); +- early_error(ErrorOutputType::default(), &msg); +- } +- OptionStability::Stable => {} +- } + } + } + } +-- +2.14.2 + diff --git a/recipes-devtools/rust/rust_1.21.0.bb b/recipes-devtools/rust/rust_1.21.0.bb index e5d6b67..31213ea 100644 --- a/recipes-devtools/rust/rust_1.21.0.bb +++ b/recipes-devtools/rust/rust_1.21.0.bb @@ -2,6 +2,7 @@ require rust.inc require rust-source-${PV}.inc require rust-snapshot-${PV}.inc +SRC_URI += "file://rust-${PV}/0001-librustc-always-allow-unstable-options.patch" SRC_URI += "file://rust-${PV}/0001-Don-t-use-remapped-path-when-loading-modules-and-inc.patch" # These are extracted from rustc/src/bootstrap/Cargo.toml via cargo-bitbake