Skip to content

Commit 83d8e03

Browse files
Fast path for register_region_obligation
1 parent 36ad75b commit 83d8e03

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)