We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20d962c commit 36cb01dCopy full SHA for 36cb01d
compiler/rustc_infer/src/infer/outlives/obligations.rs
@@ -373,6 +373,11 @@ where
373
substs: SubstsRef<'tcx>,
374
filter: impl Fn(Ty<'tcx>) -> (DefId, SubstsRef<'tcx>),
375
) {
376
+ // An optimization for a common case with opaque types.
377
+ if substs.is_empty() {
378
+ return;
379
+ }
380
+
381
// This case is thorny for inference. The fundamental problem is
382
// that there are many cases where we have choice, and inference
383
// doesn't like choice (the current region inference in
0 commit comments