Pass in span to type translator, remove zombie_even_in_user_code #278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is pre-work to clean up the zombie system, tangentially related to fixing #274
This does two things:
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.