You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the <lifetime> substitution in the occurrence of S. This is unfortunate, as lifetimes are meant to be erased during compilation, and their presence in the MIR code means that SAW users have to manually instantiate S with lifetime to get what they want. What's more, not all types carry around explicit lifetime substitutions (note that the MIR JSON contains &u32, not &'a u32).
Currently,
mir-json
is rather inconsistent about when it erasesLifetime
in compiled code or not. Here is an example to illustrate the problem:When the compiled MIR for
f
is pretty-printed, it looks like this:Note the
<lifetime>
substitution in the occurrence ofS
. This is unfortunate, as lifetimes are meant to be erased during compilation, and their presence in the MIR code means that SAW users have to manually instantiateS
withlifetime
to get what they want. What's more, not all types carry around explicitlifetime
substitutions (note that the MIR JSON contains&u32
, not&'a u32
).lifetime
s are currently emitted here:mir-json/src/analyz/ty_json.rs
Lines 660 to 663 in ec2cbf6
We should strive to avoid emitting
lifetime
substitutions at all to prevent users from having to care about them.The text was updated successfully, but these errors were encountered: