Skip to content

Commit 154b74e

Browse files
committed
Actually introduce a cycle in Reffy test.
1 parent db75313 commit 154b74e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/test/ui/lint/clashing-extern-fn-recursion.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,30 @@ mod ref_recursion_once_removed {
8989
mod a {
9090
#[repr(C)]
9191
struct Reffy1<'a> {
92-
reffy: &'a Reffy1<'a>,
92+
reffy: &'a Reffy2<'a>,
9393
}
9494

9595
struct Reffy2<'a> {
96-
reffy: &'a Reffy2<'a>,
96+
reffy: &'a Reffy1<'a>,
9797
}
9898

9999
extern "C" {
100+
#[allow(improper_ctypes)]
100101
fn reffy_once_removed(reffy: Reffy1);
101102
}
102103
}
103104
mod b {
104105
#[repr(C)]
105106
struct Reffy1<'a> {
106-
reffy: &'a Reffy1<'a>,
107+
reffy: &'a Reffy2<'a>,
107108
}
108109

109110
struct Reffy2<'a> {
110-
reffy: &'a Reffy2<'a>,
111+
reffy: &'a Reffy1<'a>,
111112
}
112113

113114
extern "C" {
115+
#[allow(improper_ctypes)]
114116
fn reffy_once_removed(reffy: Reffy1);
115117
}
116118
}

0 commit comments

Comments
 (0)