Skip to content

Testing Sync diverges on recursive type #54419

Open
@RalfJung

Description

@RalfJung

Typechecking the following program diverges:

#![feature(never_type)]

struct Foo<'a, T: 'a> {
    ph: std::marker::PhantomData<T>,
    foo: &'a Foo<'a, (T, T)>,
}

fn wub(f: Foo<!>) {
    sync(f)
}

fn sync<T: Sync>(x: T) {}

fn main() {}

Cc @eddyb @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions