@@ -9,7 +9,7 @@ trait Trait {
99struct Struct ;
1010
1111impl Trait for Struct {
12- cfg_match ! {
12+ cfg_select ! {
1313 feature = "blah" => {
1414 fn blah( & self ) {
1515 unimplemented!( ) ;
@@ -45,22 +45,22 @@ fn matches_leading_pipe() {
4545}
4646
4747#[ test]
48- fn cfg_match_basic ( ) {
49- cfg_match ! {
48+ fn cfg_select_basic ( ) {
49+ cfg_select ! {
5050 target_pointer_width = "64" => { fn f0_( ) -> bool { true } }
5151 }
5252
53- cfg_match ! {
53+ cfg_select ! {
5454 unix => { fn f1_( ) -> bool { true } }
5555 any( target_os = "macos" , target_os = "linux" ) => { fn f1_( ) -> bool { false } }
5656 }
5757
58- cfg_match ! {
58+ cfg_select ! {
5959 target_pointer_width = "32" => { fn f2_( ) -> bool { false } }
6060 target_pointer_width = "64" => { fn f2_( ) -> bool { true } }
6161 }
6262
63- cfg_match ! {
63+ cfg_select ! {
6464 target_pointer_width = "16" => { fn f3_( ) -> i32 { 1 } }
6565 _ => { fn f3_( ) -> i32 { 2 } }
6666 }
@@ -81,8 +81,8 @@ fn cfg_match_basic() {
8181}
8282
8383#[ test]
84- fn cfg_match_debug_assertions ( ) {
85- cfg_match ! {
84+ fn cfg_select_debug_assertions ( ) {
85+ cfg_select ! {
8686 debug_assertions => {
8787 assert!( cfg!( debug_assertions) ) ;
8888 assert_eq!( 4 , 2 +2 ) ;
@@ -96,8 +96,8 @@ fn cfg_match_debug_assertions() {
9696
9797#[ cfg( target_pointer_width = "64" ) ]
9898#[ test]
99- fn cfg_match_no_duplication_on_64 ( ) {
100- cfg_match ! {
99+ fn cfg_select_no_duplication_on_64 ( ) {
100+ cfg_select ! {
101101 windows => {
102102 fn foo( ) { }
103103 }
@@ -112,34 +112,34 @@ fn cfg_match_no_duplication_on_64() {
112112}
113113
114114#[ test]
115- fn cfg_match_options ( ) {
116- cfg_match ! {
115+ fn cfg_select_options ( ) {
116+ cfg_select ! {
117117 test => {
118118 use core:: option:: Option as Option2 ;
119119 fn works1( ) -> Option2 <u32 > { Some ( 1 ) }
120120 }
121121 _ => { fn works1( ) -> Option <u32 > { None } }
122122 }
123123
124- cfg_match ! {
124+ cfg_select ! {
125125 feature = "foo" => { fn works2( ) -> bool { false } }
126126 test => { fn works2( ) -> bool { true } }
127127 _ => { fn works2( ) -> bool { false } }
128128 }
129129
130- cfg_match ! {
130+ cfg_select ! {
131131 feature = "foo" => { fn works3( ) -> bool { false } }
132132 _ => { fn works3( ) -> bool { true } }
133133 }
134134
135- cfg_match ! {
135+ cfg_select ! {
136136 test => {
137137 use core:: option:: Option as Option3 ;
138138 fn works4( ) -> Option3 <u32 > { Some ( 1 ) }
139139 }
140140 }
141141
142- cfg_match ! {
142+ cfg_select ! {
143143 feature = "foo" => { fn works5( ) -> bool { false } }
144144 test => { fn works5( ) -> bool { true } }
145145 }
@@ -152,8 +152,8 @@ fn cfg_match_options() {
152152}
153153
154154#[ test]
155- fn cfg_match_two_functions ( ) {
156- cfg_match ! {
155+ fn cfg_select_two_functions ( ) {
156+ cfg_select ! {
157157 target_pointer_width = "64" => {
158158 fn foo1( ) { }
159159 fn bar1( ) { }
@@ -177,7 +177,7 @@ fn cfg_match_two_functions() {
177177}
178178
179179fn _accepts_expressions ( ) -> i32 {
180- cfg_match ! {
180+ cfg_select ! {
181181 unix => { 1 }
182182 _ => { 2 }
183183 }
@@ -188,14 +188,14 @@ fn _accepts_expressions() -> i32 {
188188fn _allows_stmt_expr_attributes ( ) {
189189 let one = 1 ;
190190 let two = 2 ;
191- cfg_match ! {
191+ cfg_select ! {
192192 unix => { one * two; }
193193 _ => { one + two; }
194194 }
195195}
196196
197197fn _expression ( ) {
198- let _ = cfg_match ! ( {
198+ let _ = cfg_select ! ( {
199199 windows => {
200200 " XP"
201201 }
0 commit comments