]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_privacy/src/lib.rs
Auto merge of #107055 - kylematsuda:eb-fn-sig, r=lcnr
[rust.git] / compiler / rustc_privacy / src / lib.rs
index 682985c6c07f76763db3ea91d5461e8f47e73224..e969bb6db9ec44ab4e0ad8a0fcd955c140e8f05d 100644 (file)
@@ -198,7 +198,8 @@ fn visit_ty(&mut self, ty: Ty<'tcx>) -> ControlFlow<V::BreakTy> {
                 // Something like `fn() -> Priv {my_func}` is considered a private type even if
                 // `my_func` is public, so we need to visit signatures.
                 if let ty::FnDef(..) = ty.kind() {
-                    tcx.bound_fn_sig(def_id).subst_identity().visit_with(self)?;
+                    // FIXME: this should probably use `substs` from `FnDef`
+                    tcx.fn_sig(def_id).subst_identity().visit_with(self)?;
                 }
                 // Inherent static methods don't have self type in substs.
                 // Something like `fn() {my_method}` type of the method