about summary refs log tree commit diff
path: root/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-06-15 12:01:01 +0200
committerGitHub <noreply@github.com>2020-06-15 12:01:01 +0200
commitf9c8a67593abd24ee7f6ccd23becbffd97d21379 (patch)
tree991e8fa98b1c948cb6219028c68b0fabda05c95b /src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs
parentd97e8ca33524399620aef1c0053f8b593bfbf521 (diff)
parent2210abea71270867fe2c69782f282c654e106fac (diff)
downloadrust-f9c8a67593abd24ee7f6ccd23becbffd97d21379.tar.gz
rust-f9c8a67593abd24ee7f6ccd23becbffd97d21379.zip
Rollup merge of #72879 - RalfJung:miri-tctx-at, r=oli-obk
Miri: avoid tracking current location three times

Miri tracks the current instruction to execute in the call stack, but it also additionally has two `TyCtxtAt` that carry a `Span` that also tracks the current instruction. That is quite silly, so this PR uses `TyCtxt` instead, and then uses a method for computing the current span when a `TyCtxtAt` is needed. Having less redundant (semi-)global state seems like a good improvement to me. :D

To keep the ConstProp errors the same, I had to add the option to `error_to_const_error` to overwrite the span. Also for some reason this changes cycle errors a bit -- not sure if we are now better or worse as giving those queries the right span. (It is unfortunately quite easy to accidentally use `DUMMY_SP` by calling the query on a `TyCtxt` instead of a `TyCtxtAt`.)

r? @oli-obk @eddyb
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs')
0 files changed, 0 insertions, 0 deletions