rustc: always allow unstable options
This commit is contained in:
committed by
Steven Walter
parent
434f7851f5
commit
528a34206b
+43
@@ -0,0 +1,43 @@
|
|||||||
|
From 6a82f31d21ac7b85211e580585cc73ab2bdb0bc9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tyler Hall <tyler.hall@lexmark.com>
|
||||||
|
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
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@ require rust.inc
|
|||||||
require rust-source-${PV}.inc
|
require rust-source-${PV}.inc
|
||||||
require rust-snapshot-${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"
|
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
|
# These are extracted from rustc/src/bootstrap/Cargo.toml via cargo-bitbake
|
||||||
|
|||||||
Reference in New Issue
Block a user