diff options
| author | lcnr <rust@lcnr.de> | 2021-03-16 00:05:45 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2021-08-26 11:00:30 +0200 |
| commit | bfaf13af4e5071b09248979e51c6614bf1353f52 (patch) | |
| tree | 930c166e6495f44e0c5e1adb9d962c094d7c1b41 /compiler/rustc_ty_utils | |
| parent | f4b606fd1703fb54bf75f064482312a67beb4a7b (diff) | |
| download | rust-bfaf13af4e5071b09248979e51c6614bf1353f52.tar.gz rust-bfaf13af4e5071b09248979e51c6614bf1353f52.zip | |
make unevaluated const substs optional
Diffstat (limited to 'compiler/rustc_ty_utils')
| -rw-r--r-- | compiler/rustc_ty_utils/src/instance.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_ty_utils/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs index b9fbb5da3e6..b00d2ab3561 100644 --- a/compiler/rustc_ty_utils/src/instance.rs +++ b/compiler/rustc_ty_utils/src/instance.rs @@ -54,8 +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 tcx_for_anon_const_substs(&self) -> Option<TyCtxt<'tcx>> { + // Anon const substs do not contain bound vars by default. + None } fn visit_binder<T: TypeFoldable<'tcx>>( &mut self, |
