-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add cast kind of from_exposed_addr (int-to-ptr casts) #97653
Conversation
Some changes occured to rustc_codegen_cranelift cc @bjorn3 Some changes occurred in src/tools/clippy. cc @rust-lang/clippy Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
r? @wesleywiser (rust-highfive has picked a reviewer for you, use r? to override) |
let ty_from = op.ty(body, tcx); | ||
let cast_ty_from = CastTy::from_ty(ty_from); | ||
let cast_ty_to = CastTy::from_ty(*ty); | ||
// Misc casts are either between floats and ints, or one ptr type to another. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oli-obk this looks like logic that would also be nice to have in MIR validation, but without duplicating everything...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, I was actually wondering whether we shouldn't move (large) parts of mir typeck to mir validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically anything that doesn't produce obligations I guess
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
📌 Commit d5a590f has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#97366 (Stabilize `{slice,array}::from_ref`) - rust-lang#97653 (add cast kind of from_exposed_addr (int-to-ptr casts)) - rust-lang#97663 (take back half-baked noaliasing check in Assignment) - rust-lang#97664 (On E0204 suggest missing type param bounds) - rust-lang#97668 (rustdoc: clean up primitive.slice.html links) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
add cast kind of from_exposed_addr (int-to-ptr casts) This is basically the dual to rust-lang#97582, for int2ptr casts. Cc `@tmiasko` rust-lang#97649
This is basically the dual to #97582, for int2ptr casts.
Cc @tmiasko #97649