We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a6a26a commit 7be059fCopy full SHA for 7be059f
src/librustc_typeck/check/mod.rs
@@ -1390,13 +1390,7 @@ fn check_cast(fcx: &FnCtxt,
1390
let t_1 = fcx.to_ty(t);
1391
let t_1 = structurally_resolved_type(fcx, span, t_1);
1392
1393
- if ty::type_is_scalar(t_1) {
1394
- // Supply the type as a hint so as to influence integer
1395
- // literals and other things that might care.
1396
- check_expr_with_expectation(fcx, e, ExpectCastableToType(t_1))
1397
- } else {
1398
- check_expr(fcx, e)
1399
- }
+ check_expr_with_expectation(fcx, e, ExpectCastableToType(t_1));
1400
1401
let t_e = fcx.expr_ty(e);
1402
0 commit comments