Skip to content

Commit d04c987

Browse files
committed
Auto merge of #141129 - compiler-errors:register-region-obl, r=<try>
Fast path for `register_region_obligation` r? `@ghost`
2 parents b0e9259 + 83d8e03 commit d04c987

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_infer/src/infer/outlives/obligations.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ impl<'tcx> InferCtxt<'tcx> {
9898
sub_region: Region<'tcx>,
9999
cause: &ObligationCause<'tcx>,
100100
) {
101+
if sup_type.is_global() {
102+
return;
103+
}
104+
101105
debug!(?sup_type, ?sub_region, ?cause);
102106
let origin = SubregionOrigin::from_obligation_cause(cause, || {
103107
infer::RelateParamBound(

0 commit comments

Comments
 (0)