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

Qualified paths don't consider the type arguments supplied to the trait #18865

Closed
nikomatsakis opened this issue Nov 11, 2014 · 0 comments
Closed

Comments

@nikomatsakis
Copy link
Contributor

Example:

#![feature(associated_types)]

trait Foo<T> {
    type Bar;
    fn get_bar() -> <Self as Foo<int>>::Bar; // SHOULD be an error but is not
}

fn main() { }
bors added a commit that referenced this issue Nov 19, 2014
…oc-type, r=pcwalton

This fixes #17388. 

Note that we don't check type parameters in trait-references and so on, so we accept some nonsense (I opened #18865). (It may be easier to just add support for `T::Foo` and deprecate the qpath code until we can implement it more robustly using the trait lookup infrastructure, not sure.)
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