Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derives Wrapper and From fails on generics with defaults #3

Open
dr-orlovsky opened this issue Dec 12, 2022 · 0 comments
Open

Derives Wrapper and From fails on generics with defaults #3

dr-orlovsky opened this issue Dec 12, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@dr-orlovsky
Copy link
Member

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

@dr-orlovsky dr-orlovsky added the bug Something isn't working label Dec 12, 2022
@dr-orlovsky dr-orlovsky transferred this issue from rust-amplify/rust-amplify Feb 5, 2023
@dr-orlovsky dr-orlovsky added this to the 4.x milestone Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant