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.
The following code:
fails with:
If the cast of
nullto*Tis removed, it works.