From f4b606fd1703fb54bf75f064482312a67beb4a7b Mon Sep 17 00:00:00 2001 From: lcnr Date: Sat, 13 Mar 2021 16:05:15 +0100 Subject: require a `tcx` for `TypeVisitor` --- compiler/rustc_ty_utils/src/instance.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/rustc_ty_utils/src') 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>( &mut self, t: &Binder<'tcx, T>, -- cgit 1.4.1-3-g733a5