Currently, we don't generate type rewrites for the target types of casts (that is, we never rewrite the T in x as T). Now that all casts have entries in rvalue_tys, I think it should be fairly straightforward to generate rewrites here.
In lighttpd, this produces 12 compile errors.
We'll need to do more work on cast rewriting in the future, since in some cases x as T should be rewritten to some kind of function call. For example, it's not valid to rewrite (x: *const i8) as *const u8 into (x: &[i8]) as &[u8].
Currently, we don't generate type rewrites for the target types of casts (that is, we never rewrite the
T
inx as T
). Now that all casts have entries inrvalue_tys
, I think it should be fairly straightforward to generate rewrites here.In lighttpd, this produces 12 compile errors.
We'll need to do more work on cast rewriting in the future, since in some cases
x as T
should be rewritten to some kind of function call. For example, it's not valid to rewrite(x: *const i8) as *const u8
into(x: &[i8]) as &[u8]
.