File tree Expand file tree Collapse file tree 8 files changed +15
-15
lines changed
closures/output_parameters Expand file tree Collapse file tree 8 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1- #![ feature( core) ]
1+ #![ feature( fnbox) ]
2+
23use std:: boxed:: FnBox ;
34
45// Return a closure taking no inputs and returning nothing
Original file line number Diff line number Diff line change 1- #![ feature( core ) ]
1+ #![ feature( iter_arith ) ]
22
33fn main ( ) {
44 println ! ( "Find the sum of all the squared odd numbers under 1000" ) ;
Original file line number Diff line number Diff line change 1- #![ feature( collections ) ]
1+ #![ feature( slice_extras ) ]
22
33use std:: env;
44
Original file line number Diff line number Diff line change 11#![ feature( rustc_private) ]
2- #![ feature( collections) ]
3- #![ feature( exit_status) ]
2+ #![ feature( slice_extras) ]
43
54extern crate getopts;
65
76use std:: env;
87use std:: io;
98use std:: io:: Write ;
9+ use std:: process;
1010
1111static VERSION : & ' static str = "1.0.0" ;
1212
@@ -29,8 +29,7 @@ fn main() {
2929 Ok ( m) => m,
3030 Err ( f) => {
3131 println ! ( "{}" , f) ;
32- env:: set_exit_status ( 1 ) ;
33- return ;
32+ process:: exit ( 1 ) ;
3433 // The exit code is 0 (success) by default.
3534 // Any exit code other than 0 indicates failure.
3635 }
Original file line number Diff line number Diff line change 11#![ feature( rustc_private) ]
2- #![ feature( collections) ]
3- #![ feature( exit_status) ]
2+ #![ feature( slice_extras) ]
43
54extern crate getopts;
65
76use std:: env;
7+ use std:: process;
88
99fn main ( ) {
1010 let args: Vec < String > = env:: args ( ) . collect ( ) ;
@@ -22,15 +22,14 @@ fn main() {
2222 Ok ( m) => m,
2323 Err ( f) => {
2424 println ! ( "{}" , f) ;
25- env:: set_exit_status ( 1 ) ;
26- return ;
25+ process:: exit ( 1 ) ;
2726 }
2827 } ;
2928 let a = if matches. opt_present ( "a" ) { true } else { false } ;
3029 let b = if matches. opt_present ( "b" ) { true } else { false } ;
3130 let c = match matches. opt_str ( "c" ) {
3231 Some ( s) => s,
33- None => String :: from_str ( "" ) ,
32+ None => String :: from ( "" ) ,
3433 } ;
3534 //^ Use `matches.opt_default` if you need a default (`opflagopt`).
3635 // Use `matches.opt_count` if you need to count how many were matched
Original file line number Diff line number Diff line change 1- #![ feature( core ) ]
1+ #![ feature( core_simd ) ]
22
33use std:: simd:: f32x4;
44
Original file line number Diff line number Diff line change 11#![ feature( test) ]
2- #![ feature( core ) ]
2+ #![ feature( core_simd ) ]
33
44use std:: simd:: f32x4;
55
Original file line number Diff line number Diff line change 1- #![ feature( core ) ]
1+ #![ feature( iter_arith ) ]
22#![ feature( scoped) ]
33
44#![ deny( warnings) ]
5+ #![ allow( deprecated) ] // thread::scoped needs to go, but can't do it now
56#![ feature( plugin) ]
67
78extern crate regex;
You can’t perform that action at this time.
0 commit comments