@@ -62,30 +62,30 @@ fn assert_ne() {
6262
6363#[ test]
6464fn cfg ( ) {
65- cfg ! ( pants) ;
66- cfg ! ( pants, ) ;
67- cfg ! ( pants = "pants" ) ;
68- cfg ! ( pants = "pants" , ) ;
69- cfg ! ( all( pants) ) ;
70- cfg ! ( all( pants) , ) ;
71- cfg ! ( all( pants, ) ) ;
72- cfg ! ( all( pants, ) , ) ;
65+ let _ = cfg ! ( pants) ;
66+ let _ = cfg ! ( pants, ) ;
67+ let _ = cfg ! ( pants = "pants" ) ;
68+ let _ = cfg ! ( pants = "pants" , ) ;
69+ let _ = cfg ! ( all( pants) ) ;
70+ let _ = cfg ! ( all( pants) , ) ;
71+ let _ = cfg ! ( all( pants, ) ) ;
72+ let _ = cfg ! ( all( pants, ) , ) ;
7373}
7474
7575#[ test]
7676fn column ( ) {
77- column ! ( ) ;
77+ let _ = column ! ( ) ;
7878}
7979
8080// compile_error! is in a companion to this test in compile-fail
8181
8282#[ test]
8383fn concat ( ) {
84- concat ! ( ) ;
85- concat ! ( "hello" ) ;
86- concat ! ( "hello" , ) ;
87- concat ! ( "hello" , " world" ) ;
88- concat ! ( "hello" , " world" , ) ;
84+ let _ = concat ! ( ) ;
85+ let _ = concat ! ( "hello" ) ;
86+ let _ = concat ! ( "hello" , ) ;
87+ let _ = concat ! ( "hello" , " world" ) ;
88+ let _ = concat ! ( "hello" , " world" , ) ;
8989}
9090
9191#[ test]
@@ -131,10 +131,10 @@ fn debug_assert_ne() {
131131
132132#[ test]
133133fn env ( ) {
134- env ! ( "PATH" ) ;
135- env ! ( "PATH" , ) ;
136- env ! ( "PATH" , "not found" ) ;
137- env ! ( "PATH" , "not found" , ) ;
134+ let _ = env ! ( "PATH" ) ;
135+ let _ = env ! ( "PATH" , ) ;
136+ let _ = env ! ( "PATH" , "not found" ) ;
137+ let _ = env ! ( "PATH" , "not found" , ) ;
138138}
139139
140140#[ cfg( std) ]
@@ -158,58 +158,58 @@ fn eprintln() {
158158
159159#[ test]
160160fn file ( ) {
161- file ! ( ) ;
161+ let _ = file ! ( ) ;
162162}
163163
164164#[ cfg( std) ]
165165#[ test]
166166fn format ( ) {
167- format ! ( "hello" ) ;
168- format ! ( "hello" , ) ;
169- format ! ( "hello {}" , "world" ) ;
170- format ! ( "hello {}" , "world" , ) ;
167+ let _ = format ! ( "hello" ) ;
168+ let _ = format ! ( "hello" , ) ;
169+ let _ = format ! ( "hello {}" , "world" ) ;
170+ let _ = format ! ( "hello {}" , "world" , ) ;
171171}
172172
173173#[ test]
174174fn format_args ( ) {
175- format_args ! ( "hello" ) ;
176- format_args ! ( "hello" , ) ;
177- format_args ! ( "hello {}" , "world" ) ;
178- format_args ! ( "hello {}" , "world" , ) ;
175+ let _ = format_args ! ( "hello" ) ;
176+ let _ = format_args ! ( "hello" , ) ;
177+ let _ = format_args ! ( "hello {}" , "world" ) ;
178+ let _ = format_args ! ( "hello {}" , "world" , ) ;
179179}
180180
181181#[ test]
182182fn include ( ) {
183- include ! ( "auxiliary/macro-comma-support.rs" ) ;
184- include ! ( "auxiliary/macro-comma-support.rs" , ) ;
183+ let _ = include ! ( "auxiliary/macro-comma-support.rs" ) ;
184+ let _ = include ! ( "auxiliary/macro-comma-support.rs" , ) ;
185185}
186186
187187#[ test]
188188fn include_bytes ( ) {
189- include_bytes ! ( "auxiliary/macro-comma-support.rs" ) ;
190- include_bytes ! ( "auxiliary/macro-comma-support.rs" , ) ;
189+ let _ = include_bytes ! ( "auxiliary/macro-comma-support.rs" ) ;
190+ let _ = include_bytes ! ( "auxiliary/macro-comma-support.rs" , ) ;
191191}
192192
193193#[ test]
194194fn include_str ( ) {
195- include_str ! ( "auxiliary/macro-comma-support.rs" ) ;
196- include_str ! ( "auxiliary/macro-comma-support.rs" , ) ;
195+ let _ = include_str ! ( "auxiliary/macro-comma-support.rs" ) ;
196+ let _ = include_str ! ( "auxiliary/macro-comma-support.rs" , ) ;
197197}
198198
199199#[ test]
200200fn line ( ) {
201- line ! ( ) ;
201+ let _ = line ! ( ) ;
202202}
203203
204204#[ test]
205205fn module_path ( ) {
206- module_path ! ( ) ;
206+ let _ = module_path ! ( ) ;
207207}
208208
209209#[ test]
210210fn option_env ( ) {
211- option_env ! ( "PATH" ) ;
212- option_env ! ( "PATH" , ) ;
211+ let _ = option_env ! ( "PATH" ) ;
212+ let _ = option_env ! ( "PATH" , ) ;
213213}
214214
215215#[ test]
@@ -309,10 +309,10 @@ fn unreachable() {
309309#[ test]
310310fn vec ( ) {
311311 let _: Vec < ( ) > = vec ! [ ] ;
312- vec ! [ 0 ] ;
313- vec ! [ 0 , ] ;
314- vec ! [ 0 , 1 ] ;
315- vec ! [ 0 , 1 , ] ;
312+ let _ = vec ! [ 0 ] ;
313+ let _ = vec ! [ 0 , ] ;
314+ let _ = vec ! [ 0 , 1 ] ;
315+ let _ = vec ! [ 0 , 1 , ] ;
316316}
317317
318318// give a test body access to a fmt::Formatter, which seems
@@ -340,21 +340,21 @@ macro_rules! test_with_formatter {
340340test_with_formatter ! {
341341 #[ test]
342342 fn write( f: & mut fmt:: Formatter ) {
343- write!( f, "hello" ) ;
344- write!( f, "hello" , ) ;
345- write!( f, "hello {}" , "world" ) ;
346- write!( f, "hello {}" , "world" , ) ;
343+ let _ = write!( f, "hello" ) ;
344+ let _ = write!( f, "hello" , ) ;
345+ let _ = write!( f, "hello {}" , "world" ) ;
346+ let _ = write!( f, "hello {}" , "world" , ) ;
347347 }
348348}
349349
350350test_with_formatter ! {
351351 #[ test]
352352 fn writeln( f: & mut fmt:: Formatter ) {
353- writeln!( f) ;
354- writeln!( f, ) ;
355- writeln!( f, "hello" ) ;
356- writeln!( f, "hello" , ) ;
357- writeln!( f, "hello {}" , "world" ) ;
358- writeln!( f, "hello {}" , "world" , ) ;
353+ let _ = writeln!( f) ;
354+ let _ = writeln!( f, ) ;
355+ let _ = writeln!( f, "hello" ) ;
356+ let _ = writeln!( f, "hello" , ) ;
357+ let _ = writeln!( f, "hello {}" , "world" ) ;
358+ let _ = writeln!( f, "hello {}" , "world" , ) ;
359359 }
360360}
0 commit comments