summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2021-03-13 16:05:15 +0100
committerlcnr <rust@lcnr.de>2021-08-26 10:54:01 +0200
commitf4b606fd1703fb54bf75f064482312a67beb4a7b (patch)
tree439d2cc27cf65355b509d6f4e0ba30efe53dd9a2 /compiler/rustc_ty_utils/src
parent76e755cf4afc34af586948e7bc25d2f1c589a884 (diff)
downloadrust-f4b606fd1703fb54bf75f064482312a67beb4a7b.tar.gz
rust-f4b606fd1703fb54bf75f064482312a67beb4a7b.zip
require a `tcx` for `TypeVisitor`
Diffstat (limited to 'compiler/rustc_ty_utils/src')
-rw-r--r--compiler/rustc_ty_utils/src/instance.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs
index 4c03abb38ca..b9fbb5da3e6 100644
--- a/compiler/rustc_ty_utils/src/instance.rs
+++ b/compiler/rustc_ty_utils/src/instance.rs
@@ -54,6 +54,9 @@ impl<'tcx> BoundVarsCollector<'tcx> {
 impl<'tcx> TypeVisitor<'tcx> for BoundVarsCollector<'tcx> {
     type BreakTy = ();
 
+    fn tcx_for_anon_const_substs(&self) -> TyCtxt<'tcx> {
+        bug!("default anon const substs can't be bound vars");
+    }
     fn visit_binder<T: TypeFoldable<'tcx>>(
         &mut self,
         t: &Binder<'tcx, T>,