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

Add support for specifying generic arg in path segment #988

Open
Y-Nak opened this issue Feb 23, 2024 · 0 comments
Open

Add support for specifying generic arg in path segment #988

Y-Nak opened this issue Feb 23, 2024 · 0 comments
Labels
v2 Issues in v2 implementation

Comments

@Y-Nak
Copy link
Member

Y-Nak commented Feb 23, 2024

Currently, it's not allowed to specify type args for each path segment.
This problem makes it impossible to call methods in some cases.
e.g.,

struct Foo<T> {
    t: T
}

impl<T> Foo<T> {
    fn method() -> i32 {
        1
    }
}

fn foo() {
    // Deciding the `Foo` type is not possible without a type argument for `Foo`.
    let x = Foo::method()
    
    // We need this! 
    let x = Foo<i32>::method()
}
@Y-Nak Y-Nak added the v2 Issues in v2 implementation label Feb 23, 2024
@Y-Nak Y-Nak changed the title Add support for specifying generic arg to path segment Add support for specifying generic arg in path segment Apr 18, 2024
@Y-Nak Y-Nak mentioned this issue Apr 23, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Issues in v2 implementation
Projects
None yet
Development

No branches or pull requests

1 participant