From 64ac52f6269ca51c04b1ca89ea9fbd233b3db0eb Mon Sep 17 00:00:00 2001 From: Adrian Taylor Date: Fri, 23 Apr 2021 14:37:13 -0700 Subject: [PATCH] Remove a test case. When dependent qualified types are supported, this runs into a different bug, #1913, where we generate an infinitely deep structure. The reduced template here doesn't really make any sense and wouldn't be encountered in the wild quite like this. Previously we generated opaque types for this case, so we didn't run into that bug. We now generate higher-fidelity types and therefore hit the problem. I can't see any way to salvage the fundamentals of this test case without the recursive problem, so I propose to remove it. --- .../tests/issue-544-stylo-creduce-2.rs | 27 ------------------- tests/headers/issue-544-stylo-creduce-2.hpp | 8 ------ 2 files changed, 35 deletions(-) delete mode 100644 tests/expectations/tests/issue-544-stylo-creduce-2.rs delete mode 100644 tests/headers/issue-544-stylo-creduce-2.hpp diff --git a/tests/expectations/tests/issue-544-stylo-creduce-2.rs b/tests/expectations/tests/issue-544-stylo-creduce-2.rs deleted file mode 100644 index de590e6762..0000000000 --- a/tests/expectations/tests/issue-544-stylo-creduce-2.rs +++ /dev/null @@ -1,27 +0,0 @@ -#![allow( - dead_code, - non_snake_case, - non_camel_case_types, - non_upper_case_globals -)] - -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Foo -where - T: __bindgen_has_inner_type_Associated, -{ - pub member: Foo_SecondAlias, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, -} -pub type Foo_FirstAlias = - ::Associated; -pub type Foo_SecondAlias = Foo>; -impl Default for Foo { - fn default() -> Self { - unsafe { ::std::mem::zeroed() } - } -} -pub trait __bindgen_has_inner_type_Associated { - type Associated: std::fmt::Debug + Default + Copy + Clone; -} diff --git a/tests/headers/issue-544-stylo-creduce-2.hpp b/tests/headers/issue-544-stylo-creduce-2.hpp deleted file mode 100644 index f3467f4528..0000000000 --- a/tests/headers/issue-544-stylo-creduce-2.hpp +++ /dev/null @@ -1,8 +0,0 @@ -// bindgen-flags: -- -std=c++14 - -template -struct Foo { - template using FirstAlias = typename T::Associated; - template using SecondAlias = Foo>; - SecondAlias member; -};