about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jsgf@fb.com>2019-11-05 17:56:37 -0800
committerJeremy Fitzhardinge <jsgf@fb.com>2019-11-06 17:31:15 -0800
commit446a43da0ee23b3a69e214f030d6d7dada345296 (patch)
treed9be9ad22975c5677ae195a4947b9b081bc580e2 /src
parent3a1b3b30c6cdd674049b144a3ced7b711de962b2 (diff)
downloadrust-446a43da0ee23b3a69e214f030d6d7dada345296.tar.gz
rust-446a43da0ee23b3a69e214f030d6d7dada345296.zip
Stabilize @file command line arguments
Issue https://github.com/rust-lang/rust/issues/63576
Diffstat (limited to 'src')
-rw-r--r--src/librustc_driver/args.rs12
-rw-r--r--src/librustc_driver/lib.rs6
2 files changed, 1 insertions, 17 deletions
diff --git a/src/librustc_driver/args.rs b/src/librustc_driver/args.rs
index 0906d358bad..339a10f9140 100644
--- a/src/librustc_driver/args.rs
+++ b/src/librustc_driver/args.rs
@@ -3,22 +3,12 @@ use std::fmt;
 use std::fs;
 use std::io;
 use std::str;
-use std::sync::atomic::{AtomicBool, Ordering};
-
-static USED_ARGSFILE_FEATURE: AtomicBool = AtomicBool::new(false);
-
-pub fn used_unstable_argsfile() -> bool {
-    USED_ARGSFILE_FEATURE.load(Ordering::Relaxed)
-}
 
 pub fn arg_expand(arg: String) -> Result<Vec<String>, Error> {
     if arg.starts_with("@") {
         let path = &arg[1..];
         let file = match fs::read_to_string(path) {
-            Ok(file) => {
-                USED_ARGSFILE_FEATURE.store(true, Ordering::Relaxed);
-                file
-            }
+            Ok(file) => file,
             Err(ref err) if err.kind() == io::ErrorKind::InvalidData => {
                 return Err(Error::Utf8Error(Some(path.to_string())));
             }
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 6e8bc11162f..8b531c5d88f 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -1043,12 +1043,6 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
     //   (unstable option being used on stable)
     nightly_options::check_nightly_options(&matches, &config::rustc_optgroups());
 
-    // Late check to see if @file was used without unstable options enabled
-    if crate::args::used_unstable_argsfile() && !nightly_options::is_unstable_enabled(&matches) {
-        early_error(ErrorOutputType::default(),
-            "@path is unstable - use -Z unstable-options to enable its use");
-    }
-
     if matches.opt_present("h") || matches.opt_present("help") {
         // Only show unstable options in --help if we accept unstable options.
         usage(matches.opt_present("verbose"), nightly_options::is_unstable_enabled(&matches));