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

Weird error while attempting to break RFC447 #25973

Closed
arielb1 opened this issue Jun 2, 2015 · 1 comment
Closed

Weird error while attempting to break RFC447 #25973

arielb1 opened this issue Jun 2, 2015 · 1 comment
Labels
A-typesystem Area: The type system

Comments

@arielb1
Copy link
Contributor

arielb1 commented Jun 2, 2015

trait Foo {
    type Out : ?Sized;
}
impl<T:?Sized> Foo for T {
    type Out = T;
}

trait Bar<T:?Sized> {}

impl<T:?Sized> Bar<<T as Foo>::Out> for () {
}
fn main() {
    println!("Hello, world!");
}

Error:

<anon>:10:1: 11:2 error: type annotations required: cannot resolve `<_ as Foo>::Out == T` [E0284]
<anon>:10 impl<T:?Sized> Bar<<T as Foo>::Out> for () {
<anon>:11 }
<anon>:10:1: 11:2 note: required by `Bar`
<anon>:10 impl<T:?Sized> Bar<<T as Foo>::Out> for () {
<anon>:11 }
error: aborting due to previous error
playpen: application terminated with error code 101

I would have expected an RFC447 error.

@steveklabnik steveklabnik added the A-typesystem Area: The type system label Jun 8, 2015
@arielb1
Copy link
Contributor Author

arielb1 commented Oct 23, 2015

Fixed (duplicate #26275).

@arielb1 arielb1 closed this as completed Oct 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system
Projects
None yet
Development

No branches or pull requests

2 participants