]> git.lizzy.rs Git - rust.git/blob - src/test/ui/specialization/issue-39618.rs
20e81e4359bacf0e177b28c8971796f4553c31d2
[rust.git] / src / test / ui / specialization / issue-39618.rs
1 // Regression test for #39618, shouldn't crash.
2 // FIXME(JohnTitor): Centril pointed out this looks suspicions, we should revisit here.
3 // More context: https://github.com/rust-lang/rust/pull/69192#discussion_r379846796
4
5 // check-pass
6
7 #![feature(specialization)]
8
9 trait Foo {
10     fn foo(&self);
11 }
12
13 trait Bar {
14     fn bar(&self);
15 }
16
17 impl<T> Bar for T where T: Foo {
18     fn bar(&self) {}
19 }
20
21 impl<T> Foo for T where T: Bar {
22     fn foo(&self) {}
23 }
24
25 impl Foo for u64 {}
26
27 fn main() {}