Skip to content

Always check type_dependent_defs #51882

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
Jul 1, 2018

Conversation

varkor
Copy link
Member

@varkor varkor commented Jun 28, 2018

Directly indexing into type_dependent_defs has caused multiple ICEs in the past (#46771, #49241, etc.) and is almost certainly responsible for #51798 too. This PR ensures we always check type_dependent_defs first, which should prevent any more of these (or at least make them easier to track down).

@rust-highfive
Copy link
Contributor

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 28, 2018
Copy link
Contributor

@estebank estebank left a comment

Choose a reason for hiding this comment

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

r=me once travis is happy

}
} else {
self.tcx.sess.delay_span_bug(expr.span,
"no type-dependent def for method call");
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I figured this wouldn't really be a problem, because if it ever does occur, the stack trace should narrow it down precisely. I'm also hoping that if this case is ever hit, the error message won't be hit anyway, because a proper UI error should have occurred.

@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 29, 2018

📌 Commit 4071adf has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 29, 2018
@bors
Copy link
Collaborator

bors commented Jul 1, 2018

⌛ Testing commit 4071adf with merge d94b804...

bors added a commit that referenced this pull request Jul 1, 2018
Always check type_dependent_defs

Directly indexing into `type_dependent_defs` has caused multiple ICEs in the past (#46771, #49241, etc.) and is almost certainly responsible for #51798 too. This PR ensures we always check `type_dependent_defs` first, which should prevent any more of these (or at least make them easier to track down).
@bors
Copy link
Collaborator

bors commented Jul 1, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: estebank
Pushing d94b804 to master...

@bors bors merged commit 4071adf into rust-lang:master Jul 1, 2018
@varkor varkor deleted the check-type_dependent_defs branch July 1, 2018 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants