Skip to content

Weird error while attempting to break RFC447 #25973

Closed
@arielb1

Description

@arielb1
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions