Skip to content
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

Pass in span to type translator, remove zombie_even_in_user_code #278

Merged
merged 1 commit into from
Nov 30, 2020

Conversation

khyperia
Copy link
Contributor

This is pre-work to clean up the zombie system, tangentially related to fixing #274

This does two things:

  • Removes the two remaining calls to zombie_even_in_user_code (other calls were cleaned up in previous PRs)
  • Passes in a span to the type translator to improve error messages

The second bit causes a lot of diff spam, so I'm submitting this as a separate PR. I did so because tracking down the errors caused by the type translator are absolutely horrible to figure out without span information (it's completely opaque what's going on). Unfortunately, quite a few places don't have span information, but still, most do, and those cases are useful. Examples of places without spans are rustc_codegen_ssa APIs that ask for, say, the type for a u64, completely without context or other information. So, we avoid calling those APIs ourselves, and instead try to call wrapper methods that do take spans, hopefully minimizing the cases where that happens. DUMMY_SP is used where spans are not available.

@mergify mergify bot merged commit c097297 into main Nov 30, 2020
@mergify mergify bot deleted the zombie-user-code branch November 30, 2020 11:55
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.

2 participants