mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 11:13:43 +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 {
|
||||
for p in predicates.iter() {
|
||||
if let GenericPredicate::Projection(projection) = p {
|
||||
if projection.projection_ty.associated_ty == res_assoc_ty
|
||||
&& projection.ty != Ty::Unknown
|
||||
{
|
||||
if projection.projection_ty.associated_ty == res_assoc_ty {
|
||||
if let ty_app!(_, params) = &projection.ty {
|
||||
if params.len() == 0 {
|
||||
return projection.ty.clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let ty = self.table.new_type_var();
|
||||
let builder = Substs::build_for_def(self.db, res_assoc_ty)
|
||||
|
Loading…
Reference in New Issue
Block a user