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
THIR building doesn't produce `ExprKind::Cast` for trivial casts.
This is all fine and good on its own but causes problems with raw pointers.
Region-unaware HIR typeck considers casting `*const Foo<'short>` to
`*const Foo<'long>` to be a trivial cast because they're the same type
modulo regions, but borrowck disagrees, emitting errors.
We now force all raw pointer casts to go through `ExprKind::Cast`, which
allows MIR building to pick the right casts that make borrowck blissfully
unaware of our lifetime crimes.
0 commit comments