Add TyCtxtAt::{ty_error, ty_error_with_message}#73176
Conversation
src/librustc_middle/ty/context.rs
Outdated
There was a problem hiding this comment.
| self.sess.delay_span_bug(self.span, msg); | |
| self.mk_ty(Error(super::sty::DelaySpanBugEmitted(()))) | |
| self.tcx.ty_error_with_message(self.span, msg) |
Perhaps I'm missing something?
There was a problem hiding this comment.
No I'm just dumb :P
There was a problem hiding this comment.
This change doesn't seem to have been made?
There was a problem hiding this comment.
This change still hasn't been made?
|
I'm personally ok with merging this into my PR, but I don't know whether @eddyb or the compiler team would want it separate. |
|
☔ The latest upstream changes (presumably #73369) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This is unblocked now |
|
I’ll rebase as soon as I can. |
844ef78 to
31d79c8
Compare
|
Rebased. |
|
cc @varkor (who reviewed my PR too) |
|
☔ The latest upstream changes (presumably #73180) made this pull request unmergeable. Please resolve the merge conflicts. |
src/librustc_middle/ty/context.rs
Outdated
There was a problem hiding this comment.
I'm worried about DelaySpanBugEmitted being defined in ty::sty, maybe it should be defined in ty::context so that only ty::context can create it.
There was a problem hiding this comment.
I think the reason I put it where I did is that it needs to be in the type definition of TyKind...
There was a problem hiding this comment.
@mark-i-m that's where it needs to be used, but it's a public type, you can use it from anywhere.
31d79c8 to
a53f176
Compare
a53f176 to
30fa84e
Compare
|
@eddyb Just pushed to resolve the previous review. Sorry for being so slow! |
|
@bors r+ |
|
📌 Commit 30fa84e has been approved by |
|
☀️ Test successful - checks-actions, checks-azure |
Only e2d957d was added, the rest comes from #70551.I was unsure where to put the implementation for those methods, please tell me if there is a better place for it.
Closes #72619,
blocked on #70551.r? @eddyb cc @mark-i-m, maybe this should be part of #70551? If so feel free to cherry-pick or ask me to file a PR against your fork.