]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/transform/mod.rs
`try_update` -> `try_upgrade`
[rust.git] / src / librustc_mir / transform / mod.rs
index eb55e5e782c7567226b6ea6b6d8c3c2d473f0d36..c79da239a40ac3dc4a8a23209bde4cc8bcdc21fe 100644 (file)
@@ -270,7 +270,7 @@ fn mir_const<'tcx>(
     tcx: TyCtxt<'tcx>,
     def: ty::WithOptConstParam<LocalDefId>,
 ) -> &'tcx Steal<Body<'tcx>> {
-    if let Some(def) = ty::WithOptConstParam::try_update(def, tcx) {
+    if let Some(def) = def.try_upgrade(tcx) {
         return tcx.mir_const(def);
     }
 
@@ -314,7 +314,7 @@ fn mir_validated(
     tcx: TyCtxt<'tcx>,
     def: ty::WithOptConstParam<LocalDefId>,
 ) -> (&'tcx Steal<Body<'tcx>>, &'tcx Steal<IndexVec<Promoted, Body<'tcx>>>) {
-    if let Some(def) = ty::WithOptConstParam::try_update(def, tcx) {
+    if let Some(def) = def.try_upgrade(tcx) {
         return tcx.mir_validated(def);
     }
 
@@ -357,7 +357,7 @@ fn mir_drops_elaborated_and_const_checked<'tcx>(
     tcx: TyCtxt<'tcx>,
     def: ty::WithOptConstParam<LocalDefId>,
 ) -> &'tcx Steal<Body<'tcx>> {
-    if let Some(def) = ty::WithOptConstParam::try_update(def, tcx) {
+    if let Some(def) = def.try_upgrade(tcx) {
         return tcx.mir_drops_elaborated_and_const_checked(def);
     }