-
Notifications
You must be signed in to change notification settings - Fork 12
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
ConstOperand is duplicated and mir::Const is missing #71
Comments
With rust-lang/rust#125967, mir::Const now exists as |
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jun 15, 2024
…-obk smir: merge identical Constant and ConstOperand types The first commit renames the const operand visitor functions on regular MIR to match the type name, that was forgotten in the original rename. The second commit changes stable MIR, fixing rust-lang/project-stable-mir#71. Previously there were two different smir types for the MIR type `ConstOperand`, one used in `Operand` and one in `VarDebugInfoContents`. Maybe we should have done this with rust-lang#125967, so there's only a single breaking change... but I saw that PR too late. Fixes rust-lang/project-stable-mir#71
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jun 15, 2024
Rollup merge of rust-lang#126410 - RalfJung:smir-const-operand, r=oli-obk smir: merge identical Constant and ConstOperand types The first commit renames the const operand visitor functions on regular MIR to match the type name, that was forgotten in the original rename. The second commit changes stable MIR, fixing rust-lang/project-stable-mir#71. Previously there were two different smir types for the MIR type `ConstOperand`, one used in `Operand` and one in `VarDebugInfoContents`. Maybe we should have done this with rust-lang#125967, so there's only a single breaking change... but I saw that PR too late. Fixes rust-lang/project-stable-mir#71
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In rustc, the main types related to consts are
ty::Const
: a const that appears in the type system e.g. an array length or a const generic. These must always be valtree-compatible.mir::Const
: a const that appears in MIR. These can have arbitrary type.mir::ConstOperand
: basically aSpanned<mir::Const>
but also with someuser_ty
thing where I honestly don't know what it is forsmir has
mir::ConstOperand
as well. However it also hasmir::Constant
which is an exact duplicate ofmir::ConstOperand
up to field renaming! And furthermore, there is nothing that corresponds to rustc'smir::Const
, which is odd.The text was updated successfully, but these errors were encountered: