From 154b74e8f959581d37d1a1ae860ee1bf7b682f34 Mon Sep 17 00:00:00 2001 From: jumbatm <30644300+jumbatm@users.noreply.github.com> Date: Sun, 16 Aug 2020 10:26:45 +1000 Subject: [PATCH] Actually introduce a cycle in Reffy test. --- .../ui/lint/clashing-extern-fn-recursion.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/test/ui/lint/clashing-extern-fn-recursion.rs b/src/test/ui/lint/clashing-extern-fn-recursion.rs index 51bfd203283..ab0fd0a2e70 100644 --- a/src/test/ui/lint/clashing-extern-fn-recursion.rs +++ b/src/test/ui/lint/clashing-extern-fn-recursion.rs @@ -89,28 +89,30 @@ mod ref_recursion_once_removed { mod a { #[repr(C)] struct Reffy1<'a> { - reffy: &'a Reffy1<'a>, - } - - struct Reffy2<'a> { reffy: &'a Reffy2<'a>, } + struct Reffy2<'a> { + reffy: &'a Reffy1<'a>, + } + extern "C" { + #[allow(improper_ctypes)] fn reffy_once_removed(reffy: Reffy1); } } mod b { #[repr(C)] struct Reffy1<'a> { - reffy: &'a Reffy1<'a>, - } - - struct Reffy2<'a> { reffy: &'a Reffy2<'a>, } + struct Reffy2<'a> { + reffy: &'a Reffy1<'a>, + } + extern "C" { + #[allow(improper_ctypes)] fn reffy_once_removed(reffy: Reffy1); } }