]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/trait-upcasting/cyclic-trait-resolution.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / traits / trait-upcasting / cyclic-trait-resolution.rs
1 trait A: B + A {}
2 //~^ ERROR cycle detected when computing the super predicates of `A` [E0391]
3
4 trait B {}
5
6 impl A for () {}
7
8 impl B for () {}
9
10 fn main() {
11     let a: Box<dyn A> = Box::new(());
12     let _b: Box<dyn B> = a;
13 }