Skip to content

"unconstrained type" in ccross with templates #42

@mrwright

Description

@mrwright

The following code:

enum X<T> {
    Some(*T)
}

fn f<T>() -> *T {
    match *(null as *X<T>) {
        Some(x) => null as *T,
    }
}

fails with:

task '<main>' failed at 'Type is not fully constrained: <unconstrained>', src/target/ccross.rs:436

If the cast of null to *T is removed, it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions