about summary refs log tree commit diff
path: root/tests/ui/infinite/mutually-recursive-infinite-types-57271.rs
blob: cb20770b48690b1816407a830b81bab642873247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// https://github.com/rust-lang/rust/issues/57271
//@ aux-build:aux-57271-lib.rs

extern crate aux_57271_lib;

use aux_57271_lib::BaseType;

pub enum ObjectType { //~ ERROR recursive types `ObjectType` and `TypeSignature` have infinite size
    Class(ClassTypeSignature),
    Array(TypeSignature),
    TypeVariable(()),
}

pub struct ClassTypeSignature {
    pub package: (),
    pub class: (),
    pub inner: (),
}

pub enum TypeSignature {
    Base(BaseType),
    Object(ObjectType),
}

fn main() {}