about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-01-18 15:43:20 -0700
committerKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-01-26 20:15:36 -0700
commite982971ff22fa190369b5f536403c37c52b10a26 (patch)
tree3b5002c6057b31c2c2d300a7ebf1bf48d22de281 /compiler/rustc_const_eval/src
parentd7948c843de94245c794e8c63dd4301a78bb5ba3 (diff)
replace usages of fn_sig query with bound_fn_sig
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/fn_queries.rs4
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/mod.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs
index 351c701305a..f91912104e5 100644
--- a/compiler/rustc_const_eval/src/const_eval/fn_queries.rs
+++ b/compiler/rustc_const_eval/src/const_eval/fn_queries.rs
@@ -64,9 +64,9 @@ fn is_promotable_const_fn(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
         && match tcx.lookup_const_stability(def_id) {
             Some(stab) => {
                 if cfg!(debug_assertions) && stab.promotable {
-                    let sig = tcx.fn_sig(def_id);
+                    let sig = tcx.bound_fn_sig(def_id);
                     assert_eq!(
-                        sig.unsafety(),
+                        sig.skip_binder().unsafety(),
                         hir::Unsafety::Normal,
                         "don't mark const unsafe fns as promotable",
                         // https://github.com/rust-lang/rust/pull/53851#issuecomment-418760682
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/mod.rs b/compiler/rustc_const_eval/src/transform/check_consts/mod.rs
index 54868e418c4..64155b2594b 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/mod.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/mod.rs
@@ -72,7 +72,7 @@ impl<'mir, 'tcx> ConstCx<'mir, 'tcx> {
             let ty::Closure(_, substs) = ty.kind() else { bug!("type_of closure not ty::Closure") };
             substs.as_closure().sig()
         } else {
-            self.tcx.fn_sig(did)
+            self.tcx.bound_fn_sig(did).subst_identity()
         }
     }
 }