File tree Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Expand file tree Collapse file tree 2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,12 @@ use std::fmt;
33use std:: fs;
44use std:: io;
55use std:: str;
6- use std:: sync:: atomic:: { AtomicBool , Ordering } ;
7-
8- static USED_ARGSFILE_FEATURE : AtomicBool = AtomicBool :: new ( false ) ;
9-
10- pub fn used_unstable_argsfile ( ) -> bool {
11- USED_ARGSFILE_FEATURE . load ( Ordering :: Relaxed )
12- }
136
147pub fn arg_expand ( arg : String ) -> Result < Vec < String > , Error > {
158 if arg. starts_with ( "@" ) {
169 let path = & arg[ 1 ..] ;
1710 let file = match fs:: read_to_string ( path) {
18- Ok ( file) => {
19- USED_ARGSFILE_FEATURE . store ( true , Ordering :: Relaxed ) ;
20- file
21- }
11+ Ok ( file) => file,
2212 Err ( ref err) if err. kind ( ) == io:: ErrorKind :: InvalidData => {
2313 return Err ( Error :: Utf8Error ( Some ( path. to_string ( ) ) ) ) ;
2414 }
Original file line number Diff line number Diff line change @@ -1016,12 +1016,6 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
10161016 // (unstable option being used on stable)
10171017 nightly_options:: check_nightly_options ( & matches, & config:: rustc_optgroups ( ) ) ;
10181018
1019- // Late check to see if @file was used without unstable options enabled
1020- if crate :: args:: used_unstable_argsfile ( ) && !nightly_options:: is_unstable_enabled ( & matches) {
1021- early_error ( ErrorOutputType :: default ( ) ,
1022- "@path is unstable - use -Z unstable-options to enable its use" ) ;
1023- }
1024-
10251019 if matches. opt_present ( "h" ) || matches. opt_present ( "help" ) {
10261020 // Only show unstable options in --help if we accept unstable options.
10271021 usage ( matches. opt_present ( "verbose" ) , nightly_options:: is_unstable_enabled ( & matches) ) ;
You can’t perform that action at this time.
0 commit comments