Skip to content

Bounds on associated types of super-traits not propagated #44656

@gnzlbg

Description

@gnzlbg

MWE on the playground:

pub trait WithAssoc {
  type Assoc;
  fn wa(&self) {}
}

pub trait Baz {}

pub trait Moo: WithAssoc
  where Self::Assoc: Baz // this is allowed
{}

pub trait Foo: Moo
// where Self::Assoc: Baz // but bound is not propagated
{
  fn foo(&self) {
    self.wa();
  }
}

fn main() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions