This is allowed:
type T = impl Copy;
let foo: T = (1u32, 2u32);
But this isn't:
type T = impl Copy; // error: unconstrained opaque type
let foo: T = (1u32, 2u32);
let (a, b) = foo;
It seems strange to me that adding code causes a type that was previously properly constrained to not longer be so. I'm not sure if it's a diagnostics issue, or if it should indeed be allowed...
See playground
rustc 1.62.0-nightly (a707f40 2022-04-29)
@rustbot label A-impl-trait F-type_alias_impl_trait
This is allowed:
But this isn't:
It seems strange to me that adding code causes a type that was previously properly constrained to not longer be so. I'm not sure if it's a diagnostics issue, or if it should indeed be allowed...
See playground
rustc 1.62.0-nightly (a707f40 2022-04-29)
@rustbot label A-impl-trait F-type_alias_impl_trait