Skip to content

preserve span when evaluating mir::ConstOperand#122471

Merged
bors merged 1 commit intorust-lang:masterfrom
RalfJung:const-eval-span
Mar 15, 2024
Merged

preserve span when evaluating mir::ConstOperand#122471
bors merged 1 commit intorust-lang:masterfrom
RalfJung:const-eval-span

Conversation

@RalfJung
Copy link
Copy Markdown
Member

This lets us show to the user where they were using the faulty const (which can be quite relevant when generics are involved).

I wonder if we should change "erroneous constant encountered" to something like "the above error was encountered while evaluating this constant" or so, to make this more similar to what the collector emits when showing a "backtrace" of where things get monomorphized? It seems a bit strange to rely on the order of emitted diagnostics for that but it seems the collector already does that.

Loading
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants