Skip to content

Trait-objects need associated-types of subtraits to be specified even when that's already done by the boxed trait #29328

Closed
@qrlpx

Description

If someone has a shorter/more conclusive title in mind, shoot.

code

trait Foo {
    type Bar;
}

trait FooBar: Foo<Bar = String> {}

struct Arb {
    foobar: Box<FooBar>,
}

Playpen: http://is.gd/6QKndB

output

test.rs:8:17: 8:23 error: the value of the associated type `Bar` (from the trait `Foo`) must be specified [E0191]
test.rs:8     foobar: Box<FooBar>,
                          ^~~~~~
test.rs:8:17: 8:23 help: run `rustc --explain E0191` to see a detailed explanation
error: aborting due to previous error

rustc version

rustc 1.5.0-nightly (0be1bcd06 2015-10-24)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-stabilityArea: `#[stable]`, `#[unstable]` etc.A-trait-systemArea: Trait systemP-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions