]> git.lizzy.rs Git - rust.git/blob - tests/ui/recursion/recursive-requirements.rs
Rollup merge of #106759 - compiler-errors:revert-105255, r=cjgillot
[rust.git] / tests / ui / recursion / recursive-requirements.rs
1 use std::marker::PhantomData;
2
3 struct AssertSync<T: Sync>(PhantomData<T>);
4
5 pub struct Foo {
6     bar: *const Bar,
7     phantom: PhantomData<Bar>,
8 }
9
10 pub struct Bar {
11     foo: *const Foo,
12     phantom: PhantomData<Foo>,
13 }
14
15 fn main() {
16     let _: AssertSync<Foo> = unimplemented!();
17     //~^ ERROR E0277
18     //~| ERROR E0277
19 }