review
This commit is contained in:
parent
95fddbc501
commit
e04f582e56
1 changed files with 6 additions and 9 deletions
|
@ -385,16 +385,13 @@ fn check_opaque_type_parameter_valid(
|
||||||
|
|
||||||
let arg_is_param = match arg.unpack() {
|
let arg_is_param = match arg.unpack() {
|
||||||
GenericArgKind::Type(ty) => matches!(ty.kind(), ty::Param(_)),
|
GenericArgKind::Type(ty) => matches!(ty.kind(), ty::Param(_)),
|
||||||
GenericArgKind::Lifetime(lt) => {
|
GenericArgKind::Lifetime(lt) if is_ty_alias => {
|
||||||
if is_ty_alias {
|
matches!(*lt, ty::ReEarlyBound(_) | ty::ReFree(_))
|
||||||
matches!(*lt, ty::ReEarlyBound(_) | ty::ReFree(_))
|
|
||||||
} else {
|
|
||||||
// FIXME(#113916): we can't currently check for unique lifetime params,
|
|
||||||
// see that issue for more. We will also have to ignore bivariant lifetime
|
|
||||||
// params for RPIT, but that's comparatively trivial ✨
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// FIXME(#113916): we can't currently check for unique lifetime params,
|
||||||
|
// see that issue for more. We will also have to ignore unused lifetime
|
||||||
|
// params for RPIT, but that's comparatively trivial ✨
|
||||||
|
GenericArgKind::Lifetime(_) => continue,
|
||||||
GenericArgKind::Const(ct) => matches!(ct.kind(), ty::ConstKind::Param(_)),
|
GenericArgKind::Const(ct) => matches!(ct.kind(), ty::ConstKind::Param(_)),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue