@@ -1542,7 +1542,7 @@ mod method_call_type_conversion {
15421542 let x7 = S ( & S2 ) ;
15431543 // Non-implicit dereference with nested borrow in order to test that the
15441544 // implicit dereference handling doesn't affect nested borrows.
1545- let t = x7. m1 ( ) ; // $ target=m1 type=t:& type=t:&T .S2
1545+ let t = x7. m1 ( ) ; // $ target=m1 type=t:& type=t:TRef .S2
15461546 println ! ( "{:?}" , x7) ;
15471547
15481548 let x9: String = "Hello" . to_string ( ) ; // $ certainType=x9:String target=to_string
@@ -1732,7 +1732,7 @@ mod builtins {
17321732 let z = x + y; // $ type=z:i32 target=add
17331733 let z = x. abs ( ) ; // $ target=abs $ type=z:i32
17341734 let c = 'c' ; // $ certainType=c:char
1735- let hello = "Hello" ; // $ certainType=hello:&T .str
1735+ let hello = "Hello" ; // $ certainType=hello:TRef .str
17361736 let f = 123.0f64 ; // $ certainType=f:f64
17371737 let t = true ; // $ certainType=t:bool
17381738 let f = false ; // $ certainType=f:bool
@@ -1753,8 +1753,8 @@ mod builtins {
17531753 }
17541754 }
17551755
1756- let x = [ 1 , 2 , 3 ] . my_method ( ) ; // $ target=my_method type=x:&T .i32
1757- let x = <[ _ ; 3 ] >:: my_method ( & [ 1 , 2 , 3 ] ) ; // $ target=my_method type=x:&T .i32
1756+ let x = [ 1 , 2 , 3 ] . my_method ( ) ; // $ target=my_method type=x:TRef .i32
1757+ let x = <[ _ ; 3 ] >:: my_method ( & [ 1 , 2 , 3 ] ) ; // $ target=my_method type=x:TRef .i32
17581758 let x = <[ i32 ; 3 ] >:: my_func ( ) ; // $ target=my_func type=x:i32
17591759
17601760 impl < T : Default > MyTrait < T > for [ T ] {
@@ -1768,8 +1768,8 @@ mod builtins {
17681768 }
17691769
17701770 let s: & [ i32 ] = & [ 1 , 2 , 3 ] ;
1771- let x = s. my_method ( ) ; // $ target=my_method type=x:&T .i32
1772- let x = <[ _ ] >:: my_method ( s) ; // $ target=my_method type=x:&T .i32
1771+ let x = s. my_method ( ) ; // $ target=my_method type=x:TRef .i32
1772+ let x = <[ _ ] >:: my_method ( s) ; // $ target=my_method type=x:TRef .i32
17731773 let x = <[ i32 ] >:: my_func ( ) ; // $ target=my_func type=x:i32
17741774
17751775 impl < T : Default > MyTrait < T > for ( T , i32 ) {
@@ -1783,8 +1783,8 @@ mod builtins {
17831783 }
17841784
17851785 let p = ( 42 , 7 ) ;
1786- let x = p. my_method ( ) ; // $ target=my_method type=x:&T .i32
1787- let x = <( _ , _ ) >:: my_method ( & p) ; // $ target=my_method type=x:&T .i32
1786+ let x = p. my_method ( ) ; // $ target=my_method type=x:TRef .i32
1787+ let x = <( _ , _ ) >:: my_method ( & p) ; // $ target=my_method type=x:TRef .i32
17881788 let x = <( i32 , i32 ) >:: my_func ( ) ; // $ target=my_func type=x:i32
17891789
17901790 impl < T : Default > MyTrait < T > for & T {
@@ -1798,8 +1798,8 @@ mod builtins {
17981798 }
17991799
18001800 let r = & 42 ;
1801- let x = r. my_method ( ) ; // $ target=my_method type=x:&T .i32
1802- let x = <& _ >:: my_method ( & r) ; // $ target=my_method type=x:&T .i32
1801+ let x = r. my_method ( ) ; // $ target=my_method type=x:TRef .i32
1802+ let x = <& _ >:: my_method ( & r) ; // $ target=my_method type=x:TRef .i32
18031803 let x = <& i32 >:: my_func ( ) ; // $ target=my_func type=x:i32
18041804
18051805 impl < T : Default > MyTrait < T > for * mut T {
@@ -1814,8 +1814,8 @@ mod builtins {
18141814
18151815 let mut v = 42 ;
18161816 let p: * mut i32 = & mut v;
1817- let x = unsafe { p. my_method ( ) } ; // $ target=my_method type=x:&T .i32
1818- let x = unsafe { <* mut _ >:: my_method ( & p) } ; // $ target=my_method type=x:&T .i32
1817+ let x = unsafe { p. my_method ( ) } ; // $ target=my_method type=x:TRef .i32
1818+ let x = unsafe { <* mut _ >:: my_method ( & p) } ; // $ target=my_method type=x:TRef .i32
18191819 let x = <* mut i32 >:: my_func ( ) ; // $ target=my_func type=x:i32
18201820 }
18211821}
@@ -2612,40 +2612,40 @@ mod loops {
26122612 for i in [ 1 , 2 , 3 ] . map ( |x| x + 1 ) { } // $ target=map MISSING: type=i:i32
26132613 for i in [ 1 , 2 , 3 ] . into_iter ( ) { } // $ target=into_iter type=i:i32
26142614
2615- let vals1 = [ 1u8 , 2 , 3 ] ; // $ type=vals1:[T;...] .u8
2615+ let vals1 = [ 1u8 , 2 , 3 ] ; // $ type=vals1:TArray .u8
26162616 for u in vals1 { } // $ type=u:u8
26172617
2618- let vals2 = [ 1u16 ; 3 ] ; // $ type=vals2:[T;...] .u16
2618+ let vals2 = [ 1u16 ; 3 ] ; // $ type=vals2:TArray .u16
26192619 for u in vals2 { } // $ type=u:u16
26202620
2621- let vals3: [ u32 ; 3 ] = [ 1 , 2 , 3 ] ; // $ certainType=vals3:[T;...] .u32
2621+ let vals3: [ u32 ; 3 ] = [ 1 , 2 , 3 ] ; // $ certainType=vals3:TArray .u32
26222622 for u in vals3 { } // $ type=u:u32
26232623
2624- let vals4: [ u64 ; 3 ] = [ 1 ; 3 ] ; // $ certainType=vals4:[T;...] .u64
2624+ let vals4: [ u64 ; 3 ] = [ 1 ; 3 ] ; // $ certainType=vals4:TArray .u64
26252625 for u in vals4 { } // $ type=u:u64
26262626
2627- let mut strings1 = [ "foo" , "bar" , "baz" ] ; // $ type=strings1:[T;...].&T .str
2628- for s in & strings1 { } // $ type=s:&T.&T .str
2629- for s in & mut strings1 { } // $ type=s:&T.&T .str
2630- for s in strings1 { } // $ type=s:&T .str
2627+ let mut strings1 = [ "foo" , "bar" , "baz" ] ; // $ type=strings1:TArray.TRef .str
2628+ for s in & strings1 { } // $ type=s:TRef.TRef .str
2629+ for s in & mut strings1 { } // $ type=s:TRef.TRef .str
2630+ for s in strings1 { } // $ type=s:TRef .str
26312631
2632- let strings2 = // $ type=strings2:[T;...] .String
2632+ let strings2 = // $ type=strings2:TArray .String
26332633 [
26342634 String :: from ( "foo" ) , // $ target=from
26352635 String :: from ( "bar" ) , // $ target=from
26362636 String :: from ( "baz" ) , // $ target=from
26372637 ] ;
26382638 for s in strings2 { } // $ type=s:String
26392639
2640- let strings3 = // $ type=strings3:&T.[T;...] .String
2640+ let strings3 = // $ type=strings3:TRef.TArray .String
26412641 & [
26422642 String :: from ( "foo" ) , // $ target=from
26432643 String :: from ( "bar" ) , // $ target=from
26442644 String :: from ( "baz" ) , // $ target=from
26452645 ] ;
2646- for s in strings3 { } // $ type=s:&T .String
2646+ for s in strings3 { } // $ type=s:TRef .String
26472647
2648- let callables = [ MyCallable :: new ( ) , MyCallable :: new ( ) , MyCallable :: new ( ) ] ; // $ target=new $ type=callables:[T;...] .MyCallable
2648+ let callables = [ MyCallable :: new ( ) , MyCallable :: new ( ) , MyCallable :: new ( ) ] ; // $ target=new $ type=callables:TArray .MyCallable
26492649 for c // $ type=c:MyCallable
26502650 in callables
26512651 {
@@ -2659,7 +2659,7 @@ mod loops {
26592659 let range = 0 ..10 ; // $ certainType=range:Range type=range:Idx.i32
26602660 for i in range { } // $ type=i:i32
26612661 let range_full = ..; // $ certainType=range_full:RangeFull
2662- for i in & [ 1i64 , 2i64 , 3i64 ] [ range_full] { } // $ target=index MISSING: type=i:&T .i64
2662+ for i in & [ 1i64 , 2i64 , 3i64 ] [ range_full] { } // $ target=index MISSING: type=i:TRef .i64
26632663
26642664 let range1 = // $ certainType=range1:Range type=range1:Idx.u16
26652665 std:: ops:: Range {
@@ -2682,8 +2682,8 @@ mod loops {
26822682 let vals5 = Vec :: from ( [ 1u32 , 2 , 3 ] ) ; // $ certainType=vals5:Vec target=from type=vals5:T.u32
26832683 for u in vals5 { } // $ type=u:u32
26842684
2685- let vals6: Vec < & u64 > = [ 1u64 , 2 , 3 ] . iter ( ) . collect ( ) ; // $ certainType=vals6:Vec certainType=vals6:T.&T .u64
2686- for u in vals6 { } // $ type=u:&T .u64
2685+ let vals6: Vec < & u64 > = [ 1u64 , 2 , 3 ] . iter ( ) . collect ( ) ; // $ certainType=vals6:Vec certainType=vals6:T.TRef .u64
2686+ for u in vals6 { } // $ type=u:TRef .u64
26872687
26882688 let mut vals7 = Vec :: new ( ) ; // $ target=new certainType=vals7:Vec type=vals7:T.u8
26892689 vals7. push ( 1u8 ) ; // $ target=push
@@ -2696,13 +2696,13 @@ mod loops {
26962696 }
26972697 } ;
26982698
2699- let mut map1 = std:: collections:: HashMap :: new ( ) ; // $ target=new type=map1:K.i32 type=map1:V.Box $ MISSING: type=map1:Hashmap type1=map1:V.T.&T .str
2699+ let mut map1 = std:: collections:: HashMap :: new ( ) ; // $ target=new type=map1:K.i32 type=map1:V.Box $ MISSING: type=map1:Hashmap type1=map1:V.T.TRef .str
27002700 map1. insert ( 1 , Box :: new ( "one" ) ) ; // $ target=insert target=new
27012701 map1. insert ( 2 , Box :: new ( "two" ) ) ; // $ target=insert target=new
2702- for key in map1. keys ( ) { } // $ target=keys type=key:&T .i32
2703- for value in map1. values ( ) { } // $ target=values type=value:&T .Box type=value:&T .T.&T .str
2704- for ( key, value) in map1. iter ( ) { } // $ target=iter type=key:&T .i32 type=value:&T .Box type=value:&T .T.&T .str
2705- for ( key, value) in & map1 { } // $ type=key:&T .i32 type=value:&T .Box type=value:&T .T.&T .str
2702+ for key in map1. keys ( ) { } // $ target=keys type=key:TRef .i32
2703+ for value in map1. values ( ) { } // $ target=values type=value:TRef .Box type=value:TRef .T.TRef .str
2704+ for ( key, value) in map1. iter ( ) { } // $ target=iter type=key:TRef .i32 type=value:TRef .Box type=value:TRef .T.TRef .str
2705+ for ( key, value) in & map1 { } // $ type=key:TRef .i32 type=value:TRef .Box type=value:TRef .T.TRef .str
27062706
27072707 // while loops
27082708
@@ -2804,11 +2804,11 @@ mod tuples {
28042804 // `a` and `b` to be inferred.
28052805 let a = Default :: default ( ) ; // $ target=default type=a:i64
28062806 let b = Default :: default ( ) ; // $ target=default type=b:bool
2807- let pair = ( a, b) ; // $ type=pair:0(2) .i64 type=pair:1(2) .bool
2807+ let pair = ( a, b) ; // $ type=pair:T0 .i64 type=pair:T1 .bool
28082808 let i: i64 = pair. 0 ; // $ fieldof=Tuple2
28092809 let j: bool = pair. 1 ; // $ fieldof=Tuple2
28102810
2811- let pair = [ 1 , 1 ] . into ( ) ; // $ type=pair:(T_2) type=pair:0(2) .i32 type=pair:1(2) .i32 MISSING: target=into
2811+ let pair = [ 1 , 1 ] . into ( ) ; // $ type=pair:(T_2) type=pair:T0 .i32 type=pair:T1 .i32 MISSING: target=into
28122812 match pair {
28132813 ( 0 , 0 ) => print ! ( "unexpected" ) ,
28142814 _ => print ! ( "expected" ) ,
0 commit comments