]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_mir_build/src/build/expr/as_temp.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / compiler / rustc_mir_build / src / build / expr / as_temp.rs
index 32373f1bef7b39aa09f6c33afeac5353a063ff2c..6067da2f69b489f9208ab2eb3ee5938ce030c4fc 100644 (file)
@@ -70,7 +70,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
                     local_decl.local_info =
                         Some(Box::new(LocalInfo::StaticRef { def_id, is_thread_local: true }));
                 }
-                ExprKind::Literal { const_id: Some(def_id), .. } => {
+                ExprKind::NamedConst { def_id, .. } | ExprKind::ConstParam { def_id, .. } => {
                     local_decl.local_info = Some(Box::new(LocalInfo::ConstRef { def_id }));
                 }
                 _ => {}