Closed
Description
This is problem blocking #23300:
struct Foo {
x: i32
}
trait Bar {
fn bar(&self) where Self : Baz { self.baz(); }
}
trait Baz {
fn baz(&self);
}
impl Bar for Foo {
}
fn main() {
let x: &Bar = &Foo { x: 22 };
}
That example encounters an ICE when building the vtable of Bar
for Foo
. The problem is that the default method bar
requires that Self:Baz
, which is not true for Foo
. This is ok, since it could never be called, but the trans code doesn't know that (yet!).
Metadata
Metadata
Assignees
Labels
No labels