Skip to content

Commit e04f582

Browse files
committed
review
1 parent 95fddbc commit e04f582

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

compiler/rustc_borrowck/src/region_infer/opaque_types.rs

+6-9
Original file line numberDiff line numberDiff line change
@@ -385,16 +385,13 @@ fn check_opaque_type_parameter_valid(
385385

386386
let arg_is_param = match arg.unpack() {
387387
GenericArgKind::Type(ty) => matches!(ty.kind(), ty::Param(_)),
388-
GenericArgKind::Lifetime(lt) => {
389-
if is_ty_alias {
390-
matches!(*lt, ty::ReEarlyBound(_) | ty::ReFree(_))
391-
} else {
392-
// FIXME(#113916): we can't currently check for unique lifetime params,
393-
// see that issue for more. We will also have to ignore bivariant lifetime
394-
// params for RPIT, but that's comparatively trivial ✨
395-
continue;
396-
}
388+
GenericArgKind::Lifetime(lt) if is_ty_alias => {
389+
matches!(*lt, ty::ReEarlyBound(_) | ty::ReFree(_))
397390
}
391+
// FIXME(#113916): we can't currently check for unique lifetime params,
392+
// see that issue for more. We will also have to ignore unused lifetime
393+
// params for RPIT, but that's comparatively trivial ✨
394+
GenericArgKind::Lifetime(_) => continue,
398395
GenericArgKind::Const(ct) => matches!(ct.kind(), ty::ConstKind::Param(_)),
399396
};
400397

0 commit comments

Comments
 (0)