File tree 2 files changed +1
-17
lines changed
2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,12 @@ use std::fmt;
3
3
use std:: fs;
4
4
use std:: io;
5
5
use 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
- }
13
6
14
7
pub fn arg_expand ( arg : String ) -> Result < Vec < String > , Error > {
15
8
if arg. starts_with ( "@" ) {
16
9
let path = & arg[ 1 ..] ;
17
10
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,
22
12
Err ( ref err) if err. kind ( ) == io:: ErrorKind :: InvalidData => {
23
13
return Err ( Error :: Utf8Error ( Some ( path. to_string ( ) ) ) ) ;
24
14
}
Original file line number Diff line number Diff line change @@ -1043,12 +1043,6 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
1043
1043
// (unstable option being used on stable)
1044
1044
nightly_options:: check_nightly_options ( & matches, & config:: rustc_optgroups ( ) ) ;
1045
1045
1046
- // Late check to see if @file was used without unstable options enabled
1047
- if crate :: args:: used_unstable_argsfile ( ) && !nightly_options:: is_unstable_enabled ( & matches) {
1048
- early_error ( ErrorOutputType :: default ( ) ,
1049
- "@path is unstable - use -Z unstable-options to enable its use" ) ;
1050
- }
1051
-
1052
1046
if matches. opt_present ( "h" ) || matches. opt_present ( "help" ) {
1053
1047
// Only show unstable options in --help if we accept unstable options.
1054
1048
usage ( matches. opt_present ( "verbose" ) , nightly_options:: is_unstable_enabled ( & matches) ) ;
You can’t perform that action at this time.
0 commit comments