Skip to content

Beta Regression: cannot reference Self from where clause for inherent impl #24944

Closed
@bytwise

Description

@bytwise

The following code compiles with rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02) but does not compile with rustc 1.0.0-beta.2 (e9080ec39 2015-04-16) (built 2015-04-16)

trait Foo {
    fn foo(&self);
}

struct Bar<T>(T);

impl<T> Bar<T> where Self: Foo {}

fn main() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-mediumMedium priorityT-langRelevant to the language 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