2019-11-05 02:18:39 +00:00
|
|
|
trait A: B + A {}
|
2021-07-31 23:08:56 +08:00
|
|
|
//~^ ERROR cycle detected when computing the super predicates of `A` [E0391]
|
2024-02-23 11:45:44 +00:00
|
|
|
//~| ERROR cycle detected when computing the implied predicates of `A` [E0391]
|
2019-11-05 02:18:39 +00:00
|
|
|
|
|
|
|
trait B {}
|
|
|
|
|
|
|
|
impl A for () {}
|
|
|
|
|
|
|
|
impl B for () {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a: Box<dyn A> = Box::new(());
|
|
|
|
let _b: Box<dyn B> = a;
|
|
|
|
}
|