Closed
Description
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.