File tree 2 files changed +3
-9
lines changed
librustc/middle/typeck/check 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -1382,13 +1382,7 @@ fn check_cast(fcx: &FnCtxt,
1382
1382
let t_1 = fcx. to_ty ( t) ;
1383
1383
let t_1 = structurally_resolved_type ( fcx, span, t_1) ;
1384
1384
1385
- if ty:: type_is_scalar ( t_1) {
1386
- // Supply the type as a hint so as to influence integer
1387
- // literals and other things that might care.
1388
- check_expr_with_expectation ( fcx, e, ExpectCastableToType ( t_1) )
1389
- } else {
1390
- check_expr ( fcx, e)
1391
- }
1385
+ check_expr_with_expectation ( fcx, e, ExpectCastableToType ( t_1) ) ;
1392
1386
1393
1387
let t_e = fcx. expr_ty ( e) ;
1394
1388
Original file line number Diff line number Diff line change 13
13
fn foo < ' a > ( ) {
14
14
if true {
15
15
// in this branch, the lifetime is bound
16
- ( box move |& mut : _ : & mut ( ) | { } ) as Box < FnMut ( & mut ( ) ) >
16
+ ( box move |_ | { } ) as Box < FnMut ( & mut ( ) ) >
17
17
} else {
18
18
// in this branch, the lifetime is free
19
- ( box move |& mut : _ : & mut ( ) | { } ) as Box < FnMut ( & ' a mut ( ) ) >
19
+ ( box move |_ | { } ) as Box < FnMut ( & ' a mut ( ) ) >
20
20
} ;
21
21
}
22
22
You can’t perform that action at this time.
0 commit comments