Skip to content

specr-transpile: Indexing a List in assert_eq!() does not desugar to .index_at(...) #7

Description

@essickmango

Encountered in minirust/spec/lang/representation.md, encode function of enums when trying to assert_eq!(AbstractByte::Uninit, bytes[offset.bytes()]); while writing the discriminant.

The rust compiler receives the same indexing method as in the markdown, which doesn't compile since List doesn't implement Index. Usually in the above example bytes[offset.bytes()] would get desugared into bytes.index_at(offset.bytes()) by specr-transpile.

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