Skip to content

Derives Wrapper and From fails on generics with defaults #3

@dr-orlovsky

Description

@dr-orlovsky
error[E0658]: associated type bounds are unstable
    |
144 | pub struct Ty<Ref: TypeRef = SubTy>(TyInner<Ref>);
    |               ^^^^^^^^^^^^
    |
    = note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information

error[E0229]: associated type bindings are not allowed here
    |
144 | pub struct Ty<Ref: TypeRef = SubTy>(TyInner<Ref>);
    |               ^^^^^^^^^^^^ associated type not allowed here

However

pub struct Ty<Ref: TypeRef>(TyInner<Ref>) where Ref: SubTy;

works

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions