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

Enable turbofish for traits #6310

Closed
asterite opened this issue Oct 22, 2024 · 0 comments · Fixed by #6416
Closed

Enable turbofish for traits #6310

asterite opened this issue Oct 22, 2024 · 0 comments · Fixed by #6416
Assignees
Labels
enhancement New feature or request

Comments

@asterite
Copy link
Collaborator

Problem

This should compile:

trait Foo<T> {
    fn foo(x: T) -> Self;
}

struct Bar {}

impl Foo<i32> for Bar {
    fn foo(x: i32) -> Self {
        Bar {}
    }
}

fn main() {
    let bar: Bar = Foo::<i32>::foo(42);
}

Happy Case

The above code compiles.

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@asterite asterite added the enhancement New feature or request label Oct 22, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Oct 22, 2024
@asterite asterite moved this from 📋 Backlog to 🚧 Blocked in Noir Oct 24, 2024
@github-project-automation github-project-automation bot moved this from 🚧 Blocked to ✅ Done in Noir Oct 31, 2024
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
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant