Skip to content

mem-categorization seems to use completely bogus type for overloaded indices #20649

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
nikomatsakis opened this issue Jan 6, 2015 · 3 comments
Labels
A-type-system Area: Type system

Comments

@nikomatsakis
Copy link
Contributor

While fixing an ICE, I noticed that mem-categorization is using the type of the collection (the self type) as the type of element:

let element_ty = .. {
                let ref_ty = self.overloaded_method_return_ty(method_ty);
                base_cmt = self.cat_rvalue_node(elt.id(), elt.span(), ref_ty);
                let self_ty = ty::ty_fn_sig(method_ty).input(0);
                ty::assert_no_late_bound_regions(self.tcx(), &self_ty)
}

Unless I'm being silly, this seems pretty bogus. But I didn't want to get things mixed up so I'm leaving it for now and filing a FIXME instead. Maybe I'm just confused.

@kmcallister kmcallister added the A-type-system Area: Type system label Jan 6, 2015
@Gankra
Copy link
Contributor

Gankra commented Jan 22, 2015

@nikomatsakis any epiphanies here?

@nikomatsakis
Copy link
Contributor Author

I forgot about this but I still think it's totally wrong. Should just fix it and see what happens, I wouldn't expect any effect.

@steveklabnik
Copy link
Member

Triage: FIXME is still in the code.

@bors bors closed this as completed in c96e352 Nov 11, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

4 participants