Skip to content

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

@RalfJung

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions