Skip to content

Explict kind declarations on types #3890

Description

@brson

It's happened to me several times that I've known that a type needed to be Send or Const, but I didn't find out until after I had already defined it and tried to use it with a Send or Const type parameter that it wasn`t the right kind.

Something like this would maybe help:

struct Foo { ... }

impl Foo: Const;

It would basically not do anything except generate an error if it doesn't type check. I might actually prefer that even the kind traits must be declared explicitly.

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

    A-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions