mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Check if parameters is empty
This commit is contained in:
parent
3a2cf708ed
commit
42813126d9
@ -387,10 +387,12 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
||||
if let Ty::Opaque(ref predicates) = inner_ty {
|
||||
for p in predicates.iter() {
|
||||
if let GenericPredicate::Projection(projection) = p {
|
||||
if projection.projection_ty.associated_ty == res_assoc_ty
|
||||
&& projection.ty != Ty::Unknown
|
||||
{
|
||||
return projection.ty.clone();
|
||||
if projection.projection_ty.associated_ty == res_assoc_ty {
|
||||
if let ty_app!(_, params) = &projection.ty {
|
||||
if params.len() == 0 {
|
||||
return projection.ty.clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user