We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c4fb71 commit 2e3221aCopy full SHA for 2e3221a
compiler/rustc_mir_build/src/thir/cx/expr.rs
@@ -650,6 +650,9 @@ impl<'tcx> Cx<'tcx> {
650
} else {
651
None
652
};
653
+ debug!(?var);
654
+ let substs = self.typeck_results.node_substs(source.hir_id);
655
+ debug!(?substs);
656
657
let source = if let Some((did, offset, var_ty)) = var {
658
let param_env_ty = self.param_env.and(var_ty);
@@ -671,7 +674,7 @@ impl<'tcx> Cx<'tcx> {
671
674
Some(did) => {
672
675
// in case we are offsetting from a computed discriminant
673
676
// and not the beginning of discriminants (which is always `0`)
- let substs = InternalSubsts::identity_for_item(tcx, did);
677
+
678
let kind =
679
ExprKind::NamedConst { def_id: did, substs, user_ty: None };
680
let lhs = self.thir.exprs.push(Expr {
0 commit comments