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,14 +387,16 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
|||||||
if let Ty::Opaque(ref predicates) = inner_ty {
|
if let Ty::Opaque(ref predicates) = inner_ty {
|
||||||
for p in predicates.iter() {
|
for p in predicates.iter() {
|
||||||
if let GenericPredicate::Projection(projection) = p {
|
if let GenericPredicate::Projection(projection) = p {
|
||||||
if projection.projection_ty.associated_ty == res_assoc_ty
|
if projection.projection_ty.associated_ty == res_assoc_ty {
|
||||||
&& projection.ty != Ty::Unknown
|
if let ty_app!(_, params) = &projection.ty {
|
||||||
{
|
if params.len() == 0 {
|
||||||
return projection.ty.clone();
|
return projection.ty.clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let ty = self.table.new_type_var();
|
let ty = self.table.new_type_var();
|
||||||
let builder = Substs::build_for_def(self.db, res_assoc_ty)
|
let builder = Substs::build_for_def(self.db, res_assoc_ty)
|
||||||
|
Loading…
Reference in New Issue
Block a user