You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
that rule would make it the same as haskell's "deriving", no? My gut says it's nicer to have it automatically derive and have these as optional -- haskell gets by, but I think it's more often in rust that we rely on satisfying the inherent kinds.
It's happened to me several times that I've known that a type needed to be
Send
orConst
, but I didn't find out until after I had already defined it and tried to use it with aSend
orConst
type parameter that it wasn`t the right kind.Something like this would maybe help:
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.
The text was updated successfully, but these errors were encountered: