@@ -1189,20 +1189,20 @@ mod type_aliases {
1189
1189
println ! ( "{:?}" , p1) ;
1190
1190
1191
1191
// Type can be only inferred from the type alias
1192
- let p2: MyPair = PairOption :: PairNone ( ) ; // $ type =p2:Fst.S1 type =p2:Snd.S2
1192
+ let p2: MyPair = PairOption :: PairNone ( ) ; // $ certainType =p2:Fst.S1 certainType =p2:Snd.S2
1193
1193
println ! ( "{:?}" , p2) ;
1194
1194
1195
1195
// First type from alias, second from constructor
1196
- let p3: AnotherPair < _ > = PairOption :: PairSnd ( S3 ) ; // $ type =p3:Fst.S2
1196
+ let p3: AnotherPair < _ > = PairOption :: PairSnd ( S3 ) ; // $ certainType =p3:Fst.S2
1197
1197
println ! ( "{:?}" , p3) ;
1198
1198
1199
1199
// First type from alias definition, second from argument to alias
1200
- let p3: AnotherPair < S3 > = PairOption :: PairNone ( ) ; // $ type =p3:Fst.S2 type =p3:Snd.S3
1200
+ let p3: AnotherPair < S3 > = PairOption :: PairNone ( ) ; // $ certainType =p3:Fst.S2 certainType =p3:Snd.S3
1201
1201
println ! ( "{:?}" , p3) ;
1202
1202
1203
1203
g ( PairOption :: PairSnd ( PairOption :: PairSnd ( S3 ) ) ) ; // $ target=g
1204
1204
1205
- let x: S7 < S2 > ; // $ type =x:Result $ type =x:E.S1 $ type =x:T.S4 $ type =x:T.T41.S2 $ type =x:T.T42.S5 $ type =x:T.T42.T5.S2
1205
+ let x: S7 < S2 > ; // $ certainType =x:Result $ certainType =x:E.S1 $ certainType =x:T.S4 $ certainType =x:T.T41.S2 $ certainType =x:T.T42.S5 $ certainType =x:T.T42.T5.S2
1206
1206
1207
1207
let y = GenS ( true ) . get_input ( ) ; // $ type=y:Result type=y:T.bool type=y:E.bool target=get_input
1208
1208
}
@@ -1248,7 +1248,7 @@ mod option_methods {
1248
1248
struct S ;
1249
1249
1250
1250
pub fn f ( ) {
1251
- let x1 = MyOption :: < S > :: new ( ) ; // $ type =x1:T.S target=new
1251
+ let x1 = MyOption :: < S > :: new ( ) ; // $ certainType =x1:T.S target=new
1252
1252
println ! ( "{:?}" , x1) ;
1253
1253
1254
1254
let mut x2 = MyOption :: new ( ) ; // $ target=new
@@ -1376,7 +1376,7 @@ mod method_call_type_conversion {
1376
1376
let t = x7. m1 ( ) ; // $ target=m1 type=t:& type=t:&T.S2
1377
1377
println ! ( "{:?}" , x7) ;
1378
1378
1379
- let x9: String = "Hello" . to_string ( ) ; // $ type =x9:String
1379
+ let x9: String = "Hello" . to_string ( ) ; // $ certainType =x9:String
1380
1380
1381
1381
// Implicit `String` -> `str` conversion happens via the `Deref` trait:
1382
1382
// https://doc.rust-lang.org/std/string/struct.String.html#deref.
@@ -1551,23 +1551,23 @@ mod try_expressions {
1551
1551
1552
1552
mod builtins {
1553
1553
pub fn f ( ) {
1554
- let x: i32 = 1 ; // $ type =x:i32
1554
+ let x: i32 = 1 ; // $ certainType =x:i32
1555
1555
let y = 2 ; // $ type=y:i32
1556
1556
let z = x + y; // $ type=z:i32 target=add
1557
1557
let z = x. abs ( ) ; // $ target=abs $ type=z:i32
1558
- let c = 'c' ; // $ type =c:char
1559
- let hello = "Hello" ; // $ type =hello:&T.str
1560
- let f = 123.0f64 ; // $ type =f:f64
1561
- let t = true ; // $ type =t:bool
1562
- let f = false ; // $ type =f:bool
1558
+ let c = 'c' ; // $ certainType =c:char
1559
+ let hello = "Hello" ; // $ certainType =hello:&T.str
1560
+ let f = 123.0f64 ; // $ certainType =f:f64
1561
+ let t = true ; // $ certainType =t:bool
1562
+ let f = false ; // $ certainType =f:bool
1563
1563
}
1564
1564
}
1565
1565
1566
1566
// Tests for non-overloaded operators.
1567
1567
mod operators {
1568
1568
pub fn f ( ) {
1569
- let x = true && false ; // $ type =x:bool
1570
- let y = true || false ; // $ type =y:bool
1569
+ let x = true && false ; // $ certainType =x:bool
1570
+ let y = true || false ; // $ certainType =y:bool
1571
1571
1572
1572
let mut a;
1573
1573
let cond = 34 == 33 ; // $ target=eq
@@ -2341,10 +2341,10 @@ mod loops {
2341
2341
let vals2 = [ 1u16 ; 3 ] ; // $ type=vals2:[T;...].u16
2342
2342
for u in vals2 { } // $ type=u:u16
2343
2343
2344
- let vals3: [ u32 ; 3 ] = [ 1 , 2 , 3 ] ; // $ type =vals3:[T;...].u32
2344
+ let vals3: [ u32 ; 3 ] = [ 1 , 2 , 3 ] ; // $ certainType =vals3:[T;...].u32
2345
2345
for u in vals3 { } // $ type=u:u32
2346
2346
2347
- let vals4: [ u64 ; 3 ] = [ 1 ; 3 ] ; // $ type =vals4:[T;...].u64
2347
+ let vals4: [ u64 ; 3 ] = [ 1 ; 3 ] ; // $ certainType =vals4:[T;...].u64
2348
2348
for u in vals4 { } // $ type=u:u64
2349
2349
2350
2350
let mut strings1 = [ "foo" , "bar" , "baz" ] ; // $ type=strings1:[T;...].&T.str
@@ -2379,9 +2379,9 @@ mod loops {
2379
2379
2380
2380
for i in 0 ..10 { } // $ type=i:i32
2381
2381
for u in [ 0u8 ..10 ] { } // $ type=u:Range type=u:Idx.u8
2382
- let range = 0 ..10 ; // $ type =range:Range type=range:Idx.i32
2382
+ let range = 0 ..10 ; // $ certainType =range:Range type=range:Idx.i32
2383
2383
for i in range { } // $ type=i:i32
2384
- let range_full = ..; // $ type =range_full:RangeFull
2384
+ let range_full = ..; // $ certainType =range_full:RangeFull
2385
2385
for i in & [ 1i64 , 2i64 , 3i64 ] [ range_full] { } // $ target=index MISSING: type=i:&T.i64
2386
2386
2387
2387
let range1 = // $ type=range1:Range type=range1:Idx.u16
@@ -2396,19 +2396,19 @@ mod loops {
2396
2396
let vals3 = vec ! [ 1 , 2 , 3 ] ; // $ MISSING: type=vals3:Vec type=vals3:T.i32
2397
2397
for i in vals3 { } // $ MISSING: type=i:i32
2398
2398
2399
- let vals4a: Vec < u16 > = [ 1u16 , 2 , 3 ] . to_vec ( ) ; // $ type =vals4a:Vec type =vals4a:T.u16
2399
+ let vals4a: Vec < u16 > = [ 1u16 , 2 , 3 ] . to_vec ( ) ; // $ certainType =vals4a:Vec certainType =vals4a:T.u16
2400
2400
for u in vals4a { } // $ type=u:u16
2401
2401
2402
2402
let vals4b = [ 1u16 , 2 , 3 ] . to_vec ( ) ; // $ MISSING: type=vals4b:Vec type=vals4b:T.u16
2403
2403
for u in vals4b { } // $ MISSING: type=u:u16
2404
2404
2405
- let vals5 = Vec :: from ( [ 1u32 , 2 , 3 ] ) ; // $ type =vals5:Vec target=from type=vals5:T.u32
2405
+ let vals5 = Vec :: from ( [ 1u32 , 2 , 3 ] ) ; // $ certainType =vals5:Vec target=from type=vals5:T.u32
2406
2406
for u in vals5 { } // $ type=u:u32
2407
2407
2408
- let vals6: Vec < & u64 > = [ 1u64 , 2 , 3 ] . iter ( ) . collect ( ) ; // $ type =vals6:Vec type =vals6:T.&T.u64
2408
+ let vals6: Vec < & u64 > = [ 1u64 , 2 , 3 ] . iter ( ) . collect ( ) ; // $ certainType =vals6:Vec certainType =vals6:T.&T.u64
2409
2409
for u in vals6 { } // $ type=u:&T.u64
2410
2410
2411
- let mut vals7 = Vec :: new ( ) ; // $ target=new type =vals7:Vec type=vals7:T.u8
2411
+ let mut vals7 = Vec :: new ( ) ; // $ target=new certainType =vals7:Vec type=vals7:T.u8
2412
2412
vals7. push ( 1u8 ) ; // $ target=push
2413
2413
for u in vals7 { } // $ type=u:u8
2414
2414
@@ -2429,11 +2429,11 @@ mod loops {
2429
2429
2430
2430
// while loops
2431
2431
2432
- let mut a: i64 = 0 ; // $ type =a:i64
2432
+ let mut a: i64 = 0 ; // $ certainType =a:i64
2433
2433
#[ rustfmt:: skip]
2434
- let _ = while a < 10 // $ target=lt type =a:i64
2434
+ let _ = while a < 10 // $ target=lt certainType =a:i64
2435
2435
{
2436
- a += 1 ; // $ type =a:i64 MISSING: target=add_assign
2436
+ a += 1 ; // $ certainType =a:i64 MISSING: target=add_assign
2437
2437
} ;
2438
2438
}
2439
2439
}
@@ -2471,11 +2471,11 @@ mod explicit_type_args {
2471
2471
}
2472
2472
2473
2473
pub fn f ( ) {
2474
- let x1: Option < S1 < S2 > > = S1 :: assoc_fun ( ) ; // $ type =x1:T.T.S2 target=assoc_fun
2475
- let x2 = S1 :: < S2 > :: assoc_fun ( ) ; // $ type =x2:T.T.S2 target=assoc_fun
2476
- let x3 = S3 :: assoc_fun ( ) ; // $ type =x3:T.T.S2 target=assoc_fun
2477
- let x4 = S1 :: < S2 > :: method ( S1 :: default ( ) ) ; // $ target=method target=default type =x4:T.S2
2478
- let x5 = S3 :: method ( S1 :: default ( ) ) ; // $ target=method target=default type =x5:T.S2
2474
+ let x1: Option < S1 < S2 > > = S1 :: assoc_fun ( ) ; // $ certainType =x1:T.T.S2 target=assoc_fun
2475
+ let x2 = S1 :: < S2 > :: assoc_fun ( ) ; // $ certainType =x2:T.T.S2 target=assoc_fun
2476
+ let x3 = S3 :: assoc_fun ( ) ; // $ certainType =x3:T.T.S2 target=assoc_fun
2477
+ let x4 = S1 :: < S2 > :: method ( S1 :: default ( ) ) ; // $ target=method target=default certainType =x4:T.S2
2478
+ let x5 = S3 :: method ( S1 :: default ( ) ) ; // $ target=method target=default certainType =x5:T.S2
2479
2479
let x6 = S4 :: < S2 > ( Default :: default ( ) ) ; // $ type=x6:T4.S2 target=default
2480
2480
let x7 = S4 ( S2 ) ; // $ type=x7:T4.S2
2481
2481
let x8 = S4 ( 0 ) ; // $ type=x8:T4.i32
@@ -2490,7 +2490,7 @@ mod explicit_type_args {
2490
2490
{
2491
2491
field : S2 :: default ( ) , // $ target=default
2492
2492
} ;
2493
- let x14 = foo :: < i32 > ( Default :: default ( ) ) ; // $ type =x14:i32 target=default target=foo
2493
+ let x14 = foo :: < i32 > ( Default :: default ( ) ) ; // $ certainType =x14:i32 target=default target=foo
2494
2494
}
2495
2495
}
2496
2496
@@ -2506,8 +2506,8 @@ mod tuples {
2506
2506
}
2507
2507
2508
2508
pub fn f ( ) {
2509
- let a = S1 :: get_pair ( ) ; // $ target=get_pair type =a:(T_2)
2510
- let mut b = S1 :: get_pair ( ) ; // $ target=get_pair type =b:(T_2)
2509
+ let a = S1 :: get_pair ( ) ; // $ target=get_pair certainType =a:(T_2)
2510
+ let mut b = S1 :: get_pair ( ) ; // $ target=get_pair certainType =b:(T_2)
2511
2511
let ( c, d) = S1 :: get_pair ( ) ; // $ target=get_pair type=c:S1 type=d:S1
2512
2512
let ( mut e, f) = S1 :: get_pair ( ) ; // $ target=get_pair type=e:S1 type=f:S1
2513
2513
let ( mut g, mut h) = S1 :: get_pair ( ) ; // $ target=get_pair type=g:S1 type=h:S1
@@ -2642,11 +2642,11 @@ pub mod path_buf {
2642
2642
}
2643
2643
2644
2644
pub fn f ( ) {
2645
- let path1 = Path :: new ( ) ; // $ target=new type =path1:Path
2645
+ let path1 = Path :: new ( ) ; // $ target=new certainType =path1:Path
2646
2646
let path2 = path1. canonicalize ( ) ; // $ target=canonicalize
2647
2647
let path3 = path2. unwrap ( ) ; // $ target=unwrap type=path3:PathBuf
2648
2648
2649
- let pathbuf1 = PathBuf :: new ( ) ; // $ target=new type =pathbuf1:PathBuf
2649
+ let pathbuf1 = PathBuf :: new ( ) ; // $ target=new certainType =pathbuf1:PathBuf
2650
2650
let pathbuf2 = pathbuf1. canonicalize ( ) ; // $ MISSING: target=canonicalize
2651
2651
let pathbuf3 = pathbuf2. unwrap ( ) ; // $ MISSING: target=unwrap type=pathbuf3:PathBuf
2652
2652
}
0 commit comments