@@ -1140,20 +1140,20 @@ mod type_aliases {
1140
1140
println ! ( "{:?}" , p1) ;
1141
1141
1142
1142
// Type can be only inferred from the type alias
1143
- let p2: MyPair = PairOption :: PairNone ( ) ; // $ type =p2:Fst.S1 type =p2:Snd.S2
1143
+ let p2: MyPair = PairOption :: PairNone ( ) ; // $ certainType =p2:Fst.S1 certainType =p2:Snd.S2
1144
1144
println ! ( "{:?}" , p2) ;
1145
1145
1146
1146
// First type from alias, second from constructor
1147
- let p3: AnotherPair < _ > = PairOption :: PairSnd ( S3 ) ; // $ type =p3:Fst.S2
1147
+ let p3: AnotherPair < _ > = PairOption :: PairSnd ( S3 ) ; // $ certainType =p3:Fst.S2
1148
1148
println ! ( "{:?}" , p3) ;
1149
1149
1150
1150
// First type from alias definition, second from argument to alias
1151
- let p3: AnotherPair < S3 > = PairOption :: PairNone ( ) ; // $ type =p3:Fst.S2 type =p3:Snd.S3
1151
+ let p3: AnotherPair < S3 > = PairOption :: PairNone ( ) ; // $ certainType =p3:Fst.S2 certainType =p3:Snd.S3
1152
1152
println ! ( "{:?}" , p3) ;
1153
1153
1154
1154
g ( PairOption :: PairSnd ( PairOption :: PairSnd ( S3 ) ) ) ; // $ target=g
1155
1155
1156
- 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
1156
+ 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
1157
1157
1158
1158
let y = GenS ( true ) . get_input ( ) ; // $ type=y:Result type=y:T.bool type=y:E.bool target=get_input
1159
1159
}
@@ -1199,7 +1199,7 @@ mod option_methods {
1199
1199
struct S ;
1200
1200
1201
1201
pub fn f ( ) {
1202
- let x1 = MyOption :: < S > :: new ( ) ; // $ type =x1:T.S target=new
1202
+ let x1 = MyOption :: < S > :: new ( ) ; // $ certainType =x1:T.S target=new
1203
1203
println ! ( "{:?}" , x1) ;
1204
1204
1205
1205
let mut x2 = MyOption :: new ( ) ; // $ target=new
@@ -1327,7 +1327,7 @@ mod method_call_type_conversion {
1327
1327
let t = x7. m1 ( ) ; // $ target=m1 type=t:& type=t:&T.S2
1328
1328
println ! ( "{:?}" , x7) ;
1329
1329
1330
- let x9: String = "Hello" . to_string ( ) ; // $ type =x9:String
1330
+ let x9: String = "Hello" . to_string ( ) ; // $ certainType =x9:String
1331
1331
1332
1332
// Implicit `String` -> `str` conversion happens via the `Deref` trait:
1333
1333
// https://doc.rust-lang.org/std/string/struct.String.html#deref.
@@ -1502,23 +1502,23 @@ mod try_expressions {
1502
1502
1503
1503
mod builtins {
1504
1504
pub fn f ( ) {
1505
- let x: i32 = 1 ; // $ type =x:i32
1505
+ let x: i32 = 1 ; // $ certainType =x:i32
1506
1506
let y = 2 ; // $ type=y:i32
1507
1507
let z = x + y; // $ type=z:i32 target=add
1508
1508
let z = x. abs ( ) ; // $ target=abs $ type=z:i32
1509
- let c = 'c' ; // $ type =c:char
1510
- let hello = "Hello" ; // $ type =hello:&T.str
1511
- let f = 123.0f64 ; // $ type =f:f64
1512
- let t = true ; // $ type =t:bool
1513
- let f = false ; // $ type =f:bool
1509
+ let c = 'c' ; // $ certainType =c:char
1510
+ let hello = "Hello" ; // $ certainType =hello:&T.str
1511
+ let f = 123.0f64 ; // $ certainType =f:f64
1512
+ let t = true ; // $ certainType =t:bool
1513
+ let f = false ; // $ certainType =f:bool
1514
1514
}
1515
1515
}
1516
1516
1517
1517
// Tests for non-overloaded operators.
1518
1518
mod operators {
1519
1519
pub fn f ( ) {
1520
- let x = true && false ; // $ type =x:bool
1521
- let y = true || false ; // $ type =y:bool
1520
+ let x = true && false ; // $ certainType =x:bool
1521
+ let y = true || false ; // $ certainType =y:bool
1522
1522
1523
1523
let mut a;
1524
1524
let cond = 34 == 33 ; // $ target=eq
@@ -2292,10 +2292,10 @@ mod loops {
2292
2292
let vals2 = [ 1u16 ; 3 ] ; // $ type=vals2:[T;...].u16
2293
2293
for u in vals2 { } // $ type=u:u16
2294
2294
2295
- let vals3: [ u32 ; 3 ] = [ 1 , 2 , 3 ] ; // $ type =vals3:[T;...].u32
2295
+ let vals3: [ u32 ; 3 ] = [ 1 , 2 , 3 ] ; // $ certainType =vals3:[T;...].u32
2296
2296
for u in vals3 { } // $ type=u:u32
2297
2297
2298
- let vals4: [ u64 ; 3 ] = [ 1 ; 3 ] ; // $ type =vals4:[T;...].u64
2298
+ let vals4: [ u64 ; 3 ] = [ 1 ; 3 ] ; // $ certainType =vals4:[T;...].u64
2299
2299
for u in vals4 { } // $ type=u:u64
2300
2300
2301
2301
let mut strings1 = [ "foo" , "bar" , "baz" ] ; // $ type=strings1:[T;...].&T.str
@@ -2330,9 +2330,9 @@ mod loops {
2330
2330
2331
2331
for i in 0 ..10 { } // $ type=i:i32
2332
2332
for u in [ 0u8 ..10 ] { } // $ type=u:Range type=u:Idx.u8
2333
- let range = 0 ..10 ; // $ type =range:Range type=range:Idx.i32
2333
+ let range = 0 ..10 ; // $ certainType =range:Range type=range:Idx.i32
2334
2334
for i in range { } // $ type=i:i32
2335
- let range_full = ..; // $ type =range_full:RangeFull
2335
+ let range_full = ..; // $ certainType =range_full:RangeFull
2336
2336
for i in & [ 1i64 , 2i64 , 3i64 ] [ range_full] { } // $ target=index MISSING: type=i:&T.i64
2337
2337
2338
2338
let range1 = // $ type=range1:Range type=range1:Idx.u16
@@ -2347,19 +2347,19 @@ mod loops {
2347
2347
let vals3 = vec ! [ 1 , 2 , 3 ] ; // $ MISSING: type=vals3:Vec type=vals3:T.i32
2348
2348
for i in vals3 { } // $ MISSING: type=i:i32
2349
2349
2350
- let vals4a: Vec < u16 > = [ 1u16 , 2 , 3 ] . to_vec ( ) ; // $ type =vals4a:Vec type =vals4a:T.u16
2350
+ let vals4a: Vec < u16 > = [ 1u16 , 2 , 3 ] . to_vec ( ) ; // $ certainType =vals4a:Vec certainType =vals4a:T.u16
2351
2351
for u in vals4a { } // $ type=u:u16
2352
2352
2353
2353
let vals4b = [ 1u16 , 2 , 3 ] . to_vec ( ) ; // $ MISSING: type=vals4b:Vec type=vals4b:T.u16
2354
2354
for u in vals4b { } // $ MISSING: type=u:u16
2355
2355
2356
- let vals5 = Vec :: from ( [ 1u32 , 2 , 3 ] ) ; // $ type =vals5:Vec target=from type=vals5:T.u32
2356
+ let vals5 = Vec :: from ( [ 1u32 , 2 , 3 ] ) ; // $ certainType =vals5:Vec target=from type=vals5:T.u32
2357
2357
for u in vals5 { } // $ type=u:u32
2358
2358
2359
- let vals6: Vec < & u64 > = [ 1u64 , 2 , 3 ] . iter ( ) . collect ( ) ; // $ type =vals6:Vec type =vals6:T.&T.u64
2359
+ let vals6: Vec < & u64 > = [ 1u64 , 2 , 3 ] . iter ( ) . collect ( ) ; // $ certainType =vals6:Vec certainType =vals6:T.&T.u64
2360
2360
for u in vals6 { } // $ type=u:&T.u64
2361
2361
2362
- let mut vals7 = Vec :: new ( ) ; // $ target=new type =vals7:Vec type=vals7:T.u8
2362
+ let mut vals7 = Vec :: new ( ) ; // $ target=new certainType =vals7:Vec type=vals7:T.u8
2363
2363
vals7. push ( 1u8 ) ; // $ target=push
2364
2364
for u in vals7 { } // $ type=u:u8
2365
2365
@@ -2380,11 +2380,11 @@ mod loops {
2380
2380
2381
2381
// while loops
2382
2382
2383
- let mut a: i64 = 0 ; // $ type =a:i64
2383
+ let mut a: i64 = 0 ; // $ certainType =a:i64
2384
2384
#[ rustfmt:: skip]
2385
- let _ = while a < 10 // $ target=lt type =a:i64
2385
+ let _ = while a < 10 // $ target=lt certainType =a:i64
2386
2386
{
2387
- a += 1 ; // $ type =a:i64 MISSING: target=add_assign
2387
+ a += 1 ; // $ certainType =a:i64 MISSING: target=add_assign
2388
2388
} ;
2389
2389
}
2390
2390
}
@@ -2422,11 +2422,11 @@ mod explicit_type_args {
2422
2422
}
2423
2423
2424
2424
pub fn f ( ) {
2425
- let x1: Option < S1 < S2 > > = S1 :: assoc_fun ( ) ; // $ type =x1:T.T.S2 target=assoc_fun
2426
- let x2 = S1 :: < S2 > :: assoc_fun ( ) ; // $ type =x2:T.T.S2 target=assoc_fun
2427
- let x3 = S3 :: assoc_fun ( ) ; // $ type =x3:T.T.S2 target=assoc_fun
2428
- let x4 = S1 :: < S2 > :: method ( S1 :: default ( ) ) ; // $ target=method target=default type =x4:T.S2
2429
- let x5 = S3 :: method ( S1 :: default ( ) ) ; // $ target=method target=default type =x5:T.S2
2425
+ let x1: Option < S1 < S2 > > = S1 :: assoc_fun ( ) ; // $ certainType =x1:T.T.S2 target=assoc_fun
2426
+ let x2 = S1 :: < S2 > :: assoc_fun ( ) ; // $ certainType =x2:T.T.S2 target=assoc_fun
2427
+ let x3 = S3 :: assoc_fun ( ) ; // $ certainType =x3:T.T.S2 target=assoc_fun
2428
+ let x4 = S1 :: < S2 > :: method ( S1 :: default ( ) ) ; // $ target=method target=default certainType =x4:T.S2
2429
+ let x5 = S3 :: method ( S1 :: default ( ) ) ; // $ target=method target=default certainType =x5:T.S2
2430
2430
let x6 = S4 :: < S2 > ( Default :: default ( ) ) ; // $ type=x6:T4.S2 target=default
2431
2431
let x7 = S4 ( S2 ) ; // $ type=x7:T4.S2
2432
2432
let x8 = S4 ( 0 ) ; // $ type=x8:T4.i32
@@ -2441,7 +2441,7 @@ mod explicit_type_args {
2441
2441
{
2442
2442
field : S2 :: default ( ) , // $ target=default
2443
2443
} ;
2444
- let x14 = foo :: < i32 > ( Default :: default ( ) ) ; // $ type =x14:i32 target=default target=foo
2444
+ let x14 = foo :: < i32 > ( Default :: default ( ) ) ; // $ certainType =x14:i32 target=default target=foo
2445
2445
}
2446
2446
}
2447
2447
@@ -2457,8 +2457,8 @@ mod tuples {
2457
2457
}
2458
2458
2459
2459
pub fn f ( ) {
2460
- let a = S1 :: get_pair ( ) ; // $ target=get_pair type =a:(T_2)
2461
- let mut b = S1 :: get_pair ( ) ; // $ target=get_pair type =b:(T_2)
2460
+ let a = S1 :: get_pair ( ) ; // $ target=get_pair certainType =a:(T_2)
2461
+ let mut b = S1 :: get_pair ( ) ; // $ target=get_pair certainType =b:(T_2)
2462
2462
let ( c, d) = S1 :: get_pair ( ) ; // $ target=get_pair type=c:S1 type=d:S1
2463
2463
let ( mut e, f) = S1 :: get_pair ( ) ; // $ target=get_pair type=e:S1 type=f:S1
2464
2464
let ( mut g, mut h) = S1 :: get_pair ( ) ; // $ target=get_pair type=g:S1 type=h:S1
@@ -2593,11 +2593,11 @@ pub mod path_buf {
2593
2593
}
2594
2594
2595
2595
pub fn f ( ) {
2596
- let path1 = Path :: new ( ) ; // $ target=new type =path1:Path
2596
+ let path1 = Path :: new ( ) ; // $ target=new certainType =path1:Path
2597
2597
let path2 = path1. canonicalize ( ) ; // $ target=canonicalize
2598
2598
let path3 = path2. unwrap ( ) ; // $ target=unwrap type=path3:PathBuf
2599
2599
2600
- let pathbuf1 = PathBuf :: new ( ) ; // $ target=new type =pathbuf1:PathBuf
2600
+ let pathbuf1 = PathBuf :: new ( ) ; // $ target=new certainType =pathbuf1:PathBuf
2601
2601
let pathbuf2 = pathbuf1. canonicalize ( ) ; // $ MISSING: target=canonicalize
2602
2602
let pathbuf3 = pathbuf2. unwrap ( ) ; // $ MISSING: target=unwrap type=pathbuf3:PathBuf
2603
2603
}
0 commit comments