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

Support trait constraints directly in a generics list #4541

Open
jfecher opened this issue Mar 12, 2024 · 0 comments
Open

Support trait constraints directly in a generics list #4541

jfecher opened this issue Mar 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jfecher
Copy link
Contributor

jfecher commented Mar 12, 2024

Problem

Trait constraints currently may only be specified in a where clause. This is inconsistent with Rust which also supports it directly in a generics list.

Happy Case

Support trait constraints within a generics list.

fn foo<T: Bar>(x: T) { }

// same as
fn foo<T>(x: T) where T: Bar {}

Project Impact

None

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@jfecher jfecher added the enhancement New feature or request label Mar 12, 2024
@jfecher jfecher mentioned this issue Mar 12, 2024
46 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant