File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/rustc_mir_build/src/thir/cx Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -650,6 +650,9 @@ impl<'tcx> Cx<'tcx> {
650650 } else {
651651 None
652652 } ;
653+ debug ! ( ?var) ;
654+ let substs = self . typeck_results . node_substs ( source. hir_id ) ;
655+ debug ! ( ?substs) ;
653656
654657 let source = if let Some ( ( did, offset, var_ty) ) = var {
655658 let param_env_ty = self . param_env . and ( var_ty) ;
@@ -671,7 +674,7 @@ impl<'tcx> Cx<'tcx> {
671674 Some ( did) => {
672675 // in case we are offsetting from a computed discriminant
673676 // and not the beginning of discriminants (which is always `0`)
674- let substs = InternalSubsts :: identity_for_item ( tcx , did ) ;
677+
675678 let kind =
676679 ExprKind :: NamedConst { def_id : did, substs, user_ty : None } ;
677680 let lhs = self . thir . exprs . push ( Expr {
You can’t perform that action at this time.
0 commit comments