rust-lang / project-stable-mir

Define compiler intermediate representation usable by external tools
Other
57 stars 12 forks source link

ConstOperand is duplicated and mir::Const is missing #71

Open RalfJung opened 6 months ago

RalfJung commented 6 months ago

In rustc, the main types related to consts are

smir has mir::ConstOperand as well. However it also has mir::Constant which is an exact duplicate of mir::ConstOperand up to field renaming! And furthermore, there is nothing that corresponds to rustc's mir::Const, which is odd.

RalfJung commented 3 months ago

With https://github.com/rust-lang/rust/pull/125967, mir::Const now exists as MirConst.