Skip to content

Fix ICE with unresolved associated items in closures (fixes #28971) #29515

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2015

Conversation

Manishearth
Copy link
Member

r? @eddyb or @nrc

@Manishearth
Copy link
Member Author

I'm not sure if this is the right approach. Copying over my comment from the issue:

Either we need to abort_if_errors when creating the closure EUV in typeck/check/upvar.rs, in analyze_closure(), OR we need to abort in check_path_enum in _match.rs.

abort_if_errors means that it may not finish checking the whole crate, so the errors will get cut off. We need to determine where it's acceptable to cut it off.

Is there a smarter way to handle this? Perhaps by propagating a TyError or something?

// Error handling done inside resolve_ty_and_def_ufcs
// Later parts of typeck need everything to be fully resolved,
// if it isn't, we should bail
tcx.sess.abort_if_errors();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this. Can't we do better?

@eddyb
Copy link
Member

eddyb commented Nov 3, 2015

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 3, 2015

📌 Commit 6468292 has been approved by eddyb

bors added a commit that referenced this pull request Nov 3, 2015
@bors
Copy link
Collaborator

bors commented Nov 3, 2015

⌛ Testing commit 6468292 with merge 4aa1f59...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants