about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2021-07-17 16:43:23 +0200
committerlcnr <rust@lcnr.de>2021-08-26 11:00:30 +0200
commitcc47998e2877f13712a12b3814cc2bbf07fbae09 (patch)
tree46d88e9a1a7ae272191acb1c7e17f067dca95124 /compiler/rustc_mir_build/src
parentbfaf13af4e5071b09248979e51c6614bf1353f52 (diff)
downloadrust-cc47998e2877f13712a12b3814cc2bbf07fbae09.tar.gz
rust-cc47998e2877f13712a12b3814cc2bbf07fbae09.zip
add `tcx` to `fn walk`
Diffstat (limited to 'compiler/rustc_mir_build/src')
-rw-r--r--compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
index 926bd830da0..bbb5de34d18 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs
@@ -237,7 +237,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
         // code at the moment, because types like `for <'a> fn(&'a ())` do
         // not *yet* implement `PartialEq`. So for now we leave this here.
         has_impl
-            || ty.walk().any(|t| match t.unpack() {
+            || ty.walk(self.tcx()).any(|t| match t.unpack() {
                 ty::subst::GenericArgKind::Lifetime(_) => false,
                 ty::subst::GenericArgKind::Type(t) => t.is_fn_ptr(),
                 ty::subst::GenericArgKind::Const(_) => false,