We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63fbefd commit 1c1573dCopy full SHA for 1c1573d
compiler/rustc_typeck/src/check/cast.rs
@@ -440,8 +440,6 @@ impl<'a, 'tcx> CastCheck<'tcx> {
440
let expr_ty = fcx.resolve_vars_if_possible(self.expr_ty);
441
let expr_ty = fcx.tcx.erase_regions(expr_ty);
442
let ty_params = fcx.tcx.mk_substs_trait(expr_ty, &[]);
443
- // Check for infer types because cases like `Option<{integer}>` would
444
- // panic otherwise.
445
if fcx
446
.tcx
447
.type_implements_trait((from_trait, ty, ty_params, fcx.param_env))
0 commit comments