]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_driver/args.rs
Auto merge of #65912 - estebank:variants-orig, r=petrochenkov
[rust.git] / src / librustc_driver / args.rs
index 0906d358badd49dcbd940e5fc6e2f59ccd817756..5e2c43596dbebdf6c1657b85bfb5c7695ecfd6d3 100644 (file)
@@ -2,23 +2,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())));
             }
@@ -46,8 +35,4 @@ fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
     }
 }
 
-impl error::Error for Error {
-    fn description(&self) -> &'static str {
-        "argument error"
-    }
-}
+impl error::Error for Error {}