Skip to content

handle kernel <> arrow type mappings via re-usable logic #314

Open
@roeap

Description

@roeap

It seems like we have several of these arrow/kernel type pairs. I wonder if there's a way to capture the pairings just once and reuse them? Maybe some kind of trait?

enum Foo {
    INT,
    STRING,
}
trait FooFromBar {
    const F: Foo;
}

impl FooFromBar for i32 {
    const F: Foo = Foo::INT;
}

impl FooFromBar for String {
    const F: Foo = Foo::STRING;
}

Originally posted by @scovich in #270 (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