Skip to content

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

Description

@RalfJung

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 a Spanned<mir::Const> but also with some user_ty thing where I honestly don't know what it is for

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions