• R
    Rollup merge of #72879 - RalfJung:miri-tctx-at, r=oli-obk · f9c8a675
    Ralf Jung 提交于
    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
    f9c8a675
util.rs 45.9 KB