-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this 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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no differentiation between this case and https://github.com/rust-lang/rust/pull/51882/files#diff-1651ba5b47f9ffa648d59265d3f94becR1018
There was a problem hiding this comment.
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.
@bors r+ |
📌 Commit 4071adf has been approved by |
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).
☀️ Test successful - status-appveyor, status-travis |
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 checktype_dependent_defs
first, which should prevent any more of these (or at least make them easier to track down).