2020-02-15 11:53:58 -06:00
|
|
|
// Regression test for #39618, shouldn't crash.
|
2020-02-15 13:36:44 -06:00
|
|
|
// FIXME(JohnTitor): Centril pointed out this looks suspicions, we should revisit here.
|
|
|
|
// More context: https://github.com/rust-lang/rust/pull/69192#discussion_r379846796
|
|
|
|
|
2020-02-15 11:53:58 -06:00
|
|
|
// check-pass
|
|
|
|
|
2020-05-17 03:22:48 -05:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2020-02-15 11:53:58 -06:00
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn foo(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Bar {
|
|
|
|
fn bar(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Bar for T where T: Foo {
|
|
|
|
fn bar(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Foo for T where T: Bar {
|
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for u64 {}
|
|
|
|
|
|
|
|
fn main() {}
|