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

Remove restrictions on generic type usage #812

Open
sbillig opened this issue Nov 15, 2022 · 0 comments
Open

Remove restrictions on generic type usage #812

sbillig opened this issue Nov 15, 2022 · 0 comments

Comments

@sbillig
Copy link
Collaborator

sbillig commented Nov 15, 2022

What is wrong?

There are some restrictions on the use of generic types that can safely be removed. For example:

fn foo<T>(val: T) {
  val.to_mem() // ERROR: can't call to_mem on generic type
}

We can just allow this, and if T is a primitive type, ignore the function call. Or we could eliminate the to_mem function and this problem would go away.

I think there are others; please add to this issue or create other issues.

@sbillig sbillig mentioned this issue Nov 16, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant