mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
f4afbe1389
preserve span when evaluating mir::ConstOperand
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](
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |