We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2162e9d commit 53effa4Copy full SHA for 53effa4
compiler/rustc_borrowck/src/region_infer/mod.rs
@@ -1267,6 +1267,11 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1267
let sub_region_scc = self.constraint_sccs.scc(sub_region);
1268
let sup_region_scc = self.constraint_sccs.scc(sup_region);
1269
1270
+ if sub_region_scc == sup_region_scc {
1271
+ debug!("{sup_region:?}: {sub_region:?} holds trivially; they are in the same SCC");
1272
+ return true;
1273
+ }
1274
+
1275
// If we are checking that `'sup: 'sub`, and `'sub` contains
1276
// some placeholder that `'sup` cannot name, then this is only
1277
// true if `'sup` outlives static.
0 commit comments