@@ -1914,23 +1914,23 @@ mod loops {
19141914 for s in & mut strings1 { } // $ MISSING: type=s:&T.str
19151915 for s in strings1 { } // $ type=s:str
19161916
1917- let strings2 = [
1917+ let strings2 = [ // $ type=strings2:[T;...].String
19181918 String :: from ( "foo" ) ,
19191919 String :: from ( "bar" ) ,
19201920 String :: from ( "baz" ) ,
1921- ] ; // $ type=strings2:[T;...].String
1921+ ] ;
19221922 for s in strings2 { } // $ type=s:String
19231923
1924- let strings3 = & [
1924+ let strings3 = & [ // $ type=strings3:&T.[T;...].String
19251925 String :: from ( "foo" ) ,
19261926 String :: from ( "bar" ) ,
19271927 String :: from ( "baz" ) ,
1928- ] ; // $ type=strings3:&T.[T;...].String
1928+ ] ;
19291929 for s in strings3 { } // $ MISSING: type=s:String
19301930
19311931 let callables = [ MyCallable :: new ( ) , MyCallable :: new ( ) , MyCallable :: new ( ) ] ; // $ MISSING: type=callables:[T;...].MyCallable; 3
1932- for c in callables {
1933- // $ type=c:MyCallable
1932+ for c in callables // $ type=c:MyCallable
1933+ {
19341934 let result = c. call ( ) ; // $ type=result:i64 method=call
19351935 }
19361936
@@ -1941,10 +1941,10 @@ mod loops {
19411941 let range = 0 ..10 ; // $ MISSING: type=range:Range type=range:Idx.i32
19421942 for i in range { } // $ MISSING: type=i:i32
19431943
1944- let range1 = std:: ops:: Range {
1944+ let range1 = std:: ops:: Range { // $ type=range1:Range type=range1:Idx.u16
19451945 start : 0u16 ,
19461946 end : 10u16 ,
1947- } ; // $ type=range1:Range type=range1:Idx.u16
1947+ } ;
19481948 for u in range1 { } // $ MISSING: type=u:u16
19491949
19501950 // for loops with containers
@@ -1986,8 +1986,8 @@ mod loops {
19861986 // while loops
19871987
19881988 let mut a: i64 = 0 ; // $ type=a:i64
1989- while a < 10 {
1990- // $ method=lt type=a:i64
1989+ while a < 10 // $ method=lt type=a:i64
1990+ {
19911991 a += 1 ; // $ type=a:i64 method=add_assign
19921992 }
19931993 }
0 commit comments